aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2007-12-17 21:02:07 +0000
committerBill Wendling <isanbard@gmail.com>2007-12-17 21:02:07 +0000
commit7d9e97c2ac6f47473b2cb34971c53db30e5e9c27 (patch)
tree327604458367ab43c1b4bfd6f40a08cfd1aabe83 /lib
parenta6e757ec9982d68d6e89276a564f38eaa85798da (diff)
downloadexternal_llvm-7d9e97c2ac6f47473b2cb34971c53db30e5e9c27.zip
external_llvm-7d9e97c2ac6f47473b2cb34971c53db30e5e9c27.tar.gz
external_llvm-7d9e97c2ac6f47473b2cb34971c53db30e5e9c27.tar.bz2
As per feedback, revised comments to (hopefully) make the different side effect
flags clearer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45120 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/Target.td15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/Target/Target.td b/lib/Target/Target.td
index 9619cb9..a9438a7 100644
--- a/lib/Target/Target.td
+++ b/lib/Target/Target.td
@@ -205,9 +205,18 @@ class Instruction {
bit isNotDuplicable = 0; // Is it unsafe to duplicate this instruction?
// Side effect flags - If neither of these flags is set, then the instruction
- // *always* has side effects. Otherwise, it's one or the other.
- bit mayHaveSideEffects = 0; // This instruction *may* have side effects.
- bit neverHasSideEffects = 0; // This instruction never has side effects.
+ // *always* has side effects. When set, the flags have these meanings:
+ //
+ // neverHasSideEffects - The instruction has no side effects that are not
+ // captured by any operands of the instruction or other flags, and when
+ // *all* instances of the instruction of that opcode have no side effects.
+ // mayHaveSideEffects - Some instances of the instruction can have side
+ // effects. The virtual method "isReallySideEffectFree" is called to
+ // determine this. Load instructions are an example of where this is
+ // useful. In general, loads always have side effects. However, loads from
+ // constant pools don't. Individual back ends make this determination.
+ bit neverHasSideEffects = 0;
+ bit mayHaveSideEffects = 0;
InstrItinClass Itinerary = NoItinerary;// Execution steps used for scheduling.