Rafael Espindola
1f6440b1e2
Change MCExpr::EvaluateAsRelocatableImpl of variables to return the original
...
variable if recursing fails to simplify it.
Factor AliasedSymbol to be a method of MCSymbol.
Update MCAssembler::EvaluateFixup to match the change in
EvaluateAsRelocatableImpl.
Remove the WeakRefExpr hack, as the object writer now sees the weakref with
no extra effort needed.
Nothing else is using MCTargetExpr, but keep it for now.
Now that the ELF writer sees relocations with aliases, handle
.weak foo2
foo2:
.weak bar2
.set bar2,foo2
.quad bar2
the same way gas does and produce a relocation with bar2.
llvm-svn: 119152
2010-11-15 16:33:49 +00:00
Rafael Espindola
f6c0121c93
Fix PR8565.
...
This moves most of the isUsed logic to the MCSymbol itself. With this we
get a bit more relaxed about allowing definitions after uses: uses that
don't evaluate their argument immediately (jmp foo) are accepted.
ddunbar, this was the smallest compromise I could think of that lets us
accept gcc (and clang!) assembly.
llvm-svn: 119144
2010-11-15 14:40:36 +00:00
Chris Lattner
b2daeac125
add fields to the .td files unconditionally, simplifying tblgen a bit.
...
Switch the ARM backend to use 'let' instead of 'set' with this change.
llvm-svn: 119120
2010-11-15 05:19:05 +00:00
Michael J. Spencer
23f31df887
Add LLVMObject Library.
...
llvm-svn: 119107
2010-11-15 03:21:41 +00:00
Chris Lattner
9a0a840839
add targetoperand flags for jump tables, constant pool and block address
...
nodes to indicate when ha16/lo16 modifiers should be used. This lets
us pass PowerPC/indirectbr.ll.
The one annoying thing about this patch is that the MCSymbolExpr isn't
expressive enough to represent ha16(label1-label2) which we need on
PowerPC. I have a terrible hack in the meantime, but this will have
to be revisited at some point.
Last major conversion item left is global variable references.
llvm-svn: 119105
2010-11-15 02:46:57 +00:00
Anton Korobeynikov
76c52dcf44
First step of huge frame-related refactoring: move emit{Prologue,Epilogue} out of TargetRegisterInfo to TargetFrameInfo, which is definitely much better suitable place
...
llvm-svn: 119097
2010-11-15 00:06:54 +00:00
Chris Lattner
51168d6510
move the pic base symbol stuff up to MachineFunction
...
since it is trivial and will be shared between ppc and x86.
This substantially simplifies the X86 backend also.
llvm-svn: 119089
2010-11-14 22:48:15 +00:00
Chris Lattner
fc626aa37d
reimplement ppc asmprinter "toc" handling to use a VariantKind
...
on the operand, required for .o file writing and fixing
the PowerPC/mult-alt-generic-powerpc64.ll failure with the new
instprinter.
llvm-svn: 119087
2010-11-14 22:22:59 +00:00
Duncan Sands
63e80e0593
If dom tree information is available, make it possible to pass
...
it to get better phi node simplification.
llvm-svn: 119055
2010-11-14 18:36:10 +00:00
Duncan Sands
ab39985d42
Strip trailing whitespace.
...
llvm-svn: 119038
2010-11-14 11:23:23 +00:00
Daniel Dunbar
2ba9f79194
MC: Simplify Mach-O and ELF object writer implementations.
...
- What was I thinking?????
llvm-svn: 118992
2010-11-13 07:33:40 +00:00
Rafael Espindola
9cd0fd30e0
Parse and record the gnu_unique_object type.
...
llvm-svn: 118980
2010-11-13 04:51:02 +00:00
Jim Grosbach
4635621b41
Trailing whitespace.
...
llvm-svn: 118978
2010-11-13 04:17:15 +00:00
Rafael Espindola
00c5605efc
Parse and remember discriminators in .loc line. I try to output them with
...
another patch.
This lets us parse a bit more of the gcc 4.5 output.
llvm-svn: 118975
2010-11-13 03:18:27 +00:00
Daniel Dunbar
fef193dc12
JIT: More nitty style tweakage, aka territory marking.
...
llvm-svn: 118973
2010-11-13 02:48:57 +00:00
Daniel Dunbar
1f695efa5e
report_fatal_error: Simplify a possible ambiguity.
...
llvm-svn: 118972
2010-11-13 02:48:51 +00:00
Daniel Dunbar
5517a3a720
More style nittiness.
...
llvm-svn: 118971
2010-11-13 02:48:46 +00:00
Daniel Dunbar
8b2d88846b
Clean up some doxyments/style.
...
llvm-svn: 118970
2010-11-13 02:48:41 +00:00
Chris Lattner
ce47bb4409
add operand iterator apis to MachineInstr, patch by ether zhhb.
...
llvm-svn: 118862
2010-11-12 00:00:21 +00:00
Dan Gohman
f3bf6591e0
Add helper functions for computing the Location of load, store,
...
and vaarg instructions.
llvm-svn: 118845
2010-11-11 21:50:19 +00:00
Dan Gohman
b20b7d2ec2
Factor out Instruction::isSafeToSpeculativelyExecute's code for
...
testing for dereferenceable pointers into a helper function,
isDereferenceablePointer. Teach it how to reason about GEPs
with simple non-zero indices.
Also eliminate ArgumentPromtion's IsAlwaysValidPointer,
which didn't check for weak externals or out of range gep
indices.
llvm-svn: 118840
2010-11-11 21:23:25 +00:00
Rafael Espindola
8555d32c9e
Initial comdat implementation.
...
llvm-svn: 118805
2010-11-11 18:13:52 +00:00
Dan Gohman
7c06994452
Add comments.
...
llvm-svn: 118799
2010-11-11 17:33:39 +00:00
Dan Gohman
503ad44b14
Add brief doxygen comments for AliasResult enum values.
...
llvm-svn: 118792
2010-11-11 16:37:38 +00:00
Dan Gohman
b476dc0f55
Set NonLocalDepInfo's Size field to UnknownSize when invalidating
...
it, so that it doesn't appear to be a known size.
llvm-svn: 118748
2010-11-11 00:20:27 +00:00
Jakob Stoklund Olesen
313b78d28e
Insert two blank SlotIndexes between basic blocks instead of just one.
...
This is the first small step towards using closed intervals for liveness instead
of the half-open intervals we're using now.
We want to be able to distinguish between a SlotIndex that represents a variable
being live-out of a basic block, and an index representing a variable live-in to
its successor.
That requires two separate indexes between blocks. One for live-outs and one for
live-ins.
With this change, getMBBEndIdx(MBB).getPrevSlot() becomes stable so it stays
greater than any instructions inserted at the end of MBB.
llvm-svn: 118747
2010-11-11 00:19:20 +00:00
Jakob Stoklund Olesen
3eb4a7b12d
Delete unused function.
...
llvm-svn: 118743
2010-11-10 23:56:02 +00:00
Devang Patel
5520a6fc97
Take care of special characters while creating named MDNode name to hold function specific local variable's info.
...
This fixes radar 8653152. I am checking in testcase as a separate check-in.
llvm-svn: 118726
2010-11-10 22:19:21 +00:00
Dan Gohman
2b4e8302a6
Enhance GVN to do more precise alias queries for non-local memory
...
references. For example, this allows gvn to eliminate the load in
this example:
void foo(int n, int* p, int *q) {
p[0] = 0;
p[1] = 1;
if (n) {
*q = p[0];
}
}
llvm-svn: 118714
2010-11-10 20:37:15 +00:00
Andrew Trick
9d60f59b55
RABasic is nearly functionally complete. There are a few remaining
...
benchmarks hitting an assertion.
Adds LiveIntervalUnion::collectInterferingVRegs.
Fixes "late spilling" by checking for any unspillable live vregs among
all physReg aliases.
llvm-svn: 118701
2010-11-10 19:18:47 +00:00
Rafael Espindola
d05bf9ffe0
Use MCSectionELF in places we know we have an ELF section.
...
llvm-svn: 118699
2010-11-10 19:05:07 +00:00
Dan Gohman
04e46fa78b
Rename AccessesArguments and AccessesArgumentsReadonly, and rewrite
...
their comments.
llvm-svn: 118696
2010-11-10 18:30:00 +00:00
Dan Gohman
271a238243
Fix a copy+pasto Duncan noticed.
...
llvm-svn: 118693
2010-11-10 18:18:23 +00:00
Dan Gohman
65a3841f03
Add a doesAccessArgPointees helper function, and update code to use
...
it, and to be consistent.
llvm-svn: 118692
2010-11-10 18:17:28 +00:00
Dan Gohman
9ae50022a1
Factor out the code for testing whether a function accesses
...
arbitrary memory into a helper function, and adjust some comments.
llvm-svn: 118687
2010-11-10 17:34:04 +00:00
Dan Gohman
3cc59e791f
Give NonLocalDepResult a NonLocalDepEntry member, replacing
...
indivudal members holding the same data, to clarify the relationship
between NonLocalDepResult and NonLocalDepEntry.
llvm-svn: 118686
2010-11-10 17:15:52 +00:00
Michael J. Spencer
000dd79ae8
System/Path: Update comments to match code.
...
llvm-svn: 118682
2010-11-10 15:05:50 +00:00
Duncan Sands
7f44d33a4c
There is no EndPtr anymore - reinterpret the original comment in terms
...
of InputData.
llvm-svn: 118677
2010-11-10 07:46:36 +00:00
Jim Grosbach
4e3653e4e1
Update ARMConstantPoolValue to not use a modifier string. Use an explicit
...
VariantKind marker to indicate the additional information necessary. Update
MC to handle the new Kinds. rdar://8647623
llvm-svn: 118671
2010-11-10 03:26:07 +00:00
Dan Gohman
1571dfc883
Make ModRefBehavior a lattice. Use this to clean up AliasAnalysis
...
chaining and simplify FunctionAttrs' GetModRefBehavior logic.
llvm-svn: 118660
2010-11-10 01:02:18 +00:00
Rafael Espindola
3c0f11a265
Fixed version of 118639 with an extra assert to catch similar problems
...
earlier. Implicit bool -> int conversions are evil!
llvm-svn: 118651
2010-11-09 23:42:07 +00:00
Rafael Espindola
a16ec0145e
Revert previous patch. Missed a case.
...
llvm-svn: 118645
2010-11-09 22:54:38 +00:00
Rafael Espindola
5e39a6d951
Remove IsExplicit. It was always false.
...
llvm-svn: 118639
2010-11-09 22:37:44 +00:00
Dan Gohman
2a7e94d265
Convert comments to doxygen syntax.
...
llvm-svn: 118628
2010-11-09 20:33:57 +00:00
Dan Gohman
27fb58d9c7
AccessesArgumentsReadonly is read-only.
...
llvm-svn: 118615
2010-11-09 19:50:00 +00:00
Dan Gohman
d50f969460
Add a AccessesArgumentsReadonly ModRefBehavior value, so that the intrinsic
...
property IntrReadArgMem can be modeled.
llvm-svn: 118614
2010-11-09 19:48:55 +00:00
Dan Gohman
9bdf92c92c
Factor out the logic for onlyReadsMemory into a helper function.
...
llvm-svn: 118611
2010-11-09 19:43:24 +00:00
Dan Gohman
3de0bd24db
Delete AccessesArgumentsAndGlobals, which was unused.
...
llvm-svn: 118610
2010-11-09 19:41:37 +00:00
Michael J. Spencer
3ae9fd29ae
System/Path/Windows: Change GetRootDirectory to return file:/// instead of C:/.
...
llvm-svn: 118502
2010-11-09 15:10:45 +00:00
Dan Gohman
227bf9fea9
Add some comments noting some correspondences between ModRefBehavior
...
values, LLVM IR function attributes, and LLVM intrinsic attributes.
llvm-svn: 118455
2010-11-08 23:46:02 +00:00