[llvm-commits] [llvm] r44727 - in /llvm/trunk: include/llvm/Target/TargetInstrInfo.h lib/CodeGen/LiveIntervalAnalysis.cpp lib/CodeGen/MachineLICM.cpp lib/Target/X86/X86InstrInfo.cpp lib/Target/X86/X86InstrInfo.h tools/Makefile utils/emacs/tablegen-mode.el

Bill Wendling isanbard at gmail.com
Sat Dec 8 15:58:46 PST 2007


Author: void
Date: Sat Dec  8 17:58:46 2007
New Revision: 44727

URL: http://llvm.org/viewvc/llvm-project?rev=44727&view=rev
Log:
Reverting 44702. It wasn't correct to rename them.

Modified:
    llvm/trunk/include/llvm/Target/TargetInstrInfo.h
    llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
    llvm/trunk/lib/CodeGen/MachineLICM.cpp
    llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
    llvm/trunk/lib/Target/X86/X86InstrInfo.h
    llvm/trunk/tools/Makefile
    llvm/trunk/utils/emacs/tablegen-mode.el

Modified: llvm/trunk/include/llvm/Target/TargetInstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetInstrInfo.h?rev=44727&r1=44726&r2=44727&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Target/TargetInstrInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetInstrInfo.h Sat Dec  8 17:58:46 2007
@@ -288,24 +288,24 @@
     return get(Opcode).Flags & M_HAS_OPTIONAL_DEF;
   }
 
-  /// hasNoSideEffects - Return true if the instruction is trivially
+  /// isTriviallyReMaterializable - Return true if the instruction is trivially
   /// rematerializable, meaning it has no side effects and requires no operands
   /// that aren't always available.
-  bool hasNoSideEffects(MachineInstr *MI) const {
+  bool isTriviallyReMaterializable(MachineInstr *MI) const {
     return (MI->getInstrDescriptor()->Flags & M_REMATERIALIZIBLE) &&
-           isTriviallyReMaterializable(MI);
+           isReallyTriviallyReMaterializable(MI);
   }
 
 protected:
-  /// isTriviallyReMaterializable - For instructions with opcodes for which the
-  /// M_REMATERIALIZABLE flag is set, this function tests whether the
-  /// instruction itself is actually trivially rematerializable, considering its
-  /// operands.  This is used for targets that have instructions that are only
-  /// trivially rematerializable for specific uses.  This predicate must return
-  /// false if the instruction has any side effects other than producing a
-  /// value, or if it requres any address registers that are not always
-  /// available.
-  virtual bool isTriviallyReMaterializable(MachineInstr *MI) const {
+  /// isReallyTriviallyReMaterializable - For instructions with opcodes for
+  /// which the M_REMATERIALIZABLE flag is set, this function tests whether the
+  /// instruction itself is actually trivially rematerializable, considering
+  /// its operands.  This is used for targets that have instructions that are
+  /// only trivially rematerializable for specific uses.  This predicate must
+  /// return false if the instruction has any side effects other than
+  /// producing a value, or if it requres any address registers that are not
+  /// always available.
+  virtual bool isReallyTriviallyReMaterializable(MachineInstr *MI) const {
     return true;
   }
 

Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=44727&r1=44726&r2=44727&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Sat Dec  8 17:58:46 2007
@@ -613,7 +613,7 @@
     return false;
 
   isLoad = false;
-  if (tii_->hasNoSideEffects(MI)) {
+  if (tii_->isTriviallyReMaterializable(MI)) {
     isLoad = MI->getInstrDescriptor()->Flags & M_LOAD_FLAG;
     return true;
   }

Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLICM.cpp?rev=44727&r1=44726&r2=44727&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/MachineLICM.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineLICM.cpp Sat Dec  8 17:58:46 2007
@@ -39,7 +39,7 @@
               cl::desc("Perform loop-invariant code motion on machine code"));
 }
 
-STATISTIC(NumHoisted, "Number of machine instructions hoisted out of loop");
+STATISTIC(NumHoisted, "Number of machine instructions hoisted out of loops");
 
 namespace {
   class VISIBILITY_HIDDEN MachineLICM : public MachineFunctionPass {
@@ -93,11 +93,11 @@
     /// 
     void MapVirtualRegisterDefs(const MachineFunction &MF);
 
-    /// isInSubLoop - A little predicate that returns true if the specified
+    /// IsInSubLoop - A little predicate that returns true if the specified
     /// basic block is in a subloop of the current one, not the current one
     /// itself.
     ///
-    bool isInSubLoop(MachineBasicBlock *BB) {
+    bool IsInSubLoop(MachineBasicBlock *BB) {
       assert(CurLoop->contains(BB) && "Only valid if BB is IN the loop");
 
       for (MachineLoop::iterator
@@ -120,7 +120,7 @@
       if (TID->ImplicitUses || !I.getNumOperands()) return false;
 
       MachineOpCode Opcode = TID->Opcode;
-      return TII->hasNoSideEffects(&I) &&
+      return TII->isTriviallyReMaterializable(&I) &&
         // FIXME: Below necessary?
         !(TII->isReturn(Opcode) ||
           TII->isTerminatorInstr(Opcode) ||
@@ -132,12 +132,12 @@
           TII->isStore(Opcode));
     }
 
-    /// isLoopInvariantInst - Returns true if the instruction is loop
+    /// IsLoopInvariantInst - Returns true if the instruction is loop
     /// invariant. I.e., all virtual register operands are defined outside of
     /// the loop, physical registers aren't accessed (explicitly or implicitly),
     /// and the instruction is hoistable.
     /// 
-    bool isLoopInvariantInst(MachineInstr &I);
+    bool IsLoopInvariantInst(MachineInstr &I);
 
     /// FindPredecessors - Get all of the predecessors of the loop that are not
     /// back-edges.
@@ -246,7 +246,7 @@
 
   // Only need to process the contents of this block if it is not part of a
   // subloop (which would already have been processed).
-  if (!isInSubLoop(BB))
+  if (!IsInSubLoop(BB))
     for (MachineBasicBlock::iterator
            I = BB->begin(), E = BB->end(); I != E; ) {
       MachineInstr &MI = *I++;
@@ -263,12 +263,12 @@
     HoistRegion(Children[I]);
 }
 
-/// isLoopInvariantInst - Returns true if the instruction is loop
+/// IsLoopInvariantInst - Returns true if the instruction is loop
 /// invariant. I.e., all virtual register operands are defined outside of the
 /// loop, physical registers aren't accessed (explicitly or implicitly), and the
 /// instruction is hoistable.
 /// 
-bool MachineLICM::isLoopInvariantInst(MachineInstr &I) {
+bool MachineLICM::IsLoopInvariantInst(MachineInstr &I) {
   if (!CanHoistInst(I)) return false;
 
   // The instruction is loop invariant if all of its operands are loop-invariant
@@ -300,7 +300,7 @@
 /// that is safe to hoist, this instruction is called to do the dirty work.
 ///
 void MachineLICM::Hoist(MachineInstr &MI) {
-  if (!isLoopInvariantInst(MI)) return;
+  if (!IsLoopInvariantInst(MI)) return;
 
   std::vector<MachineBasicBlock*> Preds;
 
@@ -316,9 +316,9 @@
   // the loop header.
   MachineBasicBlock *MBB = Preds.front();
 
-  // FIXME: We are assuming at first that the basic blocks coming into this loop
-  // have only one successor each. This isn't the case in general because we
-  // haven't broken critical edges or added preheaders.
+  // FIXME: We are assuming at first that the basic block coming into this loop
+  // has only one successor. This isn't the case in general because we haven't
+  // broken critical edges or added preheaders.
   if (MBB->succ_size() != 1) return;
   assert(*MBB->succ_begin() == CurLoop->getHeader() &&
          "The predecessor doesn't feed directly into the loop header!");

Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=44727&r1=44726&r2=44727&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Sat Dec  8 17:58:46 2007
@@ -116,7 +116,7 @@
 }
 
 
-bool X86InstrInfo::isTriviallyReMaterializable(MachineInstr *MI) const {
+bool X86InstrInfo::isReallyTriviallyReMaterializable(MachineInstr *MI) const {
   switch (MI->getOpcode()) {
   default: break;
   case X86::MOV8rm:

Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.h?rev=44727&r1=44726&r2=44727&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.h (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.h Sat Dec  8 17:58:46 2007
@@ -239,7 +239,7 @@
                    unsigned& destReg) const;
   unsigned isLoadFromStackSlot(MachineInstr *MI, int &FrameIndex) const;
   unsigned isStoreToStackSlot(MachineInstr *MI, int &FrameIndex) const;
-  bool isTriviallyReMaterializable(MachineInstr *MI) const;
+  bool isReallyTriviallyReMaterializable(MachineInstr *MI) const;
   
   /// convertToThreeAddress - This method must be implemented by targets that
   /// set the M_CONVERTIBLE_TO_3_ADDR flag.  When this flag is set, the target

Modified: llvm/trunk/tools/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/Makefile?rev=44727&r1=44726&r2=44727&view=diff

==============================================================================
--- llvm/trunk/tools/Makefile (original)
+++ llvm/trunk/tools/Makefile Sat Dec  8 17:58:46 2007
@@ -16,8 +16,8 @@
                  llc llvm-ranlib llvm-ar llvm-nm \
                  llvm-ld llvmc llvm-prof llvm-link \
 		 lli gccas gccld llvm-extract llvm-db llvm2cpp \
-		 bugpoint llvm-bcanalyzer llvm-stub
-		
+		 bugpoint llvm-bcanalyzer llvm-stub cfe
+
 
 include $(LEVEL)/Makefile.config
 

Modified: llvm/trunk/utils/emacs/tablegen-mode.el
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/emacs/tablegen-mode.el?rev=44727&r1=44726&r2=44727&view=diff

==============================================================================
--- llvm/trunk/utils/emacs/tablegen-mode.el (original)
+++ llvm/trunk/utils/emacs/tablegen-mode.el Sat Dec  8 17:58:46 2007
@@ -16,7 +16,7 @@
 
 (defvar tablegen-font-lock-keywords
   (let ((kw (mapconcat 'identity
-                       '("class" "def" "defm" "field" "in" "include"
+                       '("class" "defm" "def" "field" "include" "in"
                          "let" "multiclass")
                        "\\|"))
         (type-kw (mapconcat 'identity
@@ -49,15 +49,16 @@
 
 ;; ---------------------- Syntax table ---------------------------
 ;; Shamelessly ripped from jasmin.el
-;; URL: http://www.neilvandyke.org/jasmin-emacs/jasmin.el.html
+;; URL: http://www.neilvandyke.org/jasmin-emacs/jasmin.el
 
 (if (not tablegen-mode-syntax-table)
     (progn
       (setq tablegen-mode-syntax-table (make-syntax-table))
-      (mapcar (function (lambda (n)
-                          (modify-syntax-entry (aref n 0)
-                                               (aref n 1)
-                                               tablegen-mode-syntax-table)))
+      (mapcar (function
+               (lambda (n)
+                 (modify-syntax-entry (aref n 0)
+                                      (aref n 1)
+                                      tablegen-mode-syntax-table)))
               '(
                 ;; whitespace (` ')
                 [?\^m " "]
@@ -66,8 +67,6 @@
                 [?\t  " "]
                 [?\   " "]
                 ;; word constituents (`w')
-                ;;[?<  "w"]
-                ;;[?>  "w"]
                 [?\%  "w"]
                 ;;[?_  "w  "]
                 ;; comments
@@ -78,15 +77,17 @@
                 ;; symbol constituents (`_')
                 ;; punctuation (`.')
                 ;; open paren (`(')
-                [?\( "("]
-                [?\[ "("]
-                [?\{ "("]
+                [?\(  "("]
+                [?\[  "("]
+                [?\{  "("]
+                [?\<  "("]
                 ;; close paren (`)')
-                [?\) ")"]
-                [?\] ")"]
-                [?\} ")"]
+                [?\)  ")"]
+                [?\]  ")"]
+                [?\}  ")"]
+                [?\>  ")"]
                 ;; string quote ('"')
-                [?\" "\""]
+                [?\"  "\""]
                 ))))
 
 ;; --------------------- Abbrev table -----------------------------
@@ -101,11 +102,10 @@
 (if (not tablegen-mode-map)
     ()  ; Do not change the keymap if it is already set up.
   (setq tablegen-mode-map (make-sparse-keymap))
-  (define-key tablegen-mode-map "\t" 'tab-to-tab-stop)
+  (define-key tablegen-mode-map "\t"  'tab-to-tab-stop)
   (define-key tablegen-mode-map "\es" 'center-line)
   (define-key tablegen-mode-map "\eS" 'center-paragraph))
 
-
 (defun tablegen-mode ()
   "Major mode for editing TableGen description files.
   \\{tablegen-mode-map}
@@ -115,10 +115,10 @@
   (use-local-map tablegen-mode-map)         ; Provides the local keymap.
   (setq major-mode 'tablegen-mode)          
 
-  (make-local-variable	'font-lock-defaults)
+  (make-local-variable 'font-lock-defaults)
   (setq major-mode 'tablegen-mode           ; This is how describe-mode
                                             ;   finds the doc string to print.
-	mode-name "TableGen"                      ; This name goes into the modeline.
+	mode-name "TableGen"                ; This name goes into the modeline.
 	font-lock-defaults `(tablegen-font-lock-keywords))
 
   (setq local-abbrev-table tablegen-mode-abbrev-table)





More information about the llvm-commits mailing list