Commit Graph

10267 Commits

Author SHA1 Message Date
Devang Patel
921bdaaa98 Use StringRef to construct MDString.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84811 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-22 00:22:05 +00:00
Devang Patel
49b63a1f2c Remove meaningless const.
Pass StringRef by value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84804 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-22 00:10:15 +00:00
Devang Patel
49708ad993 Derive metadata hierarchy from Value instead of User.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84801 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-21 23:57:35 +00:00
Dale Johannesen
8ba2d5befc Rename msasm to alignstack per review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84795 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-21 23:28:00 +00:00
Devang Patel
f7ce17e8a8 Use StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84786 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-21 21:57:13 +00:00
Devang Patel
028fa77d56 Do not use SmallVector to store MDNode elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84784 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-21 21:25:09 +00:00
Devang Patel
b5df28a151 Incorporate various suggestions Chris gave during metadata review.
- i < getNumElements()  instead of getNumElements() > i
- Make setParent() private
- Fix use of resizeOperands
- Reset HasMetadata bit after removing all metadata attached to an instruction
- Efficient use of iterators



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84765 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-21 17:33:41 +00:00
Jeffrey Yasskin
4cdc5bb707 Delete the MacOSJITEventListener per echristo's request. It was disabled by
default and didn't work anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84720 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-21 00:43:48 +00:00
Devang Patel
d9723e9a28 Cosmetic changes.
s/validName/isValidName/g
s/with an Instruction/to an Instruction/g
s/RegisterMDKind/registerMDKind/g


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84689 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 22:50:27 +00:00
Jeffrey Yasskin
1e86132122 Move the Function*->allocated blocks map from the JITMemoryManager to the
JITEmitter.

I'm gradually making Functions auto-remove themselves from the JIT when they're
destroyed. In this case, the Function needs to be removed from the JITEmitter,
but the map recording which Functions need to be removed lived behind the
JITMemoryManager interface, which made things difficult.

This patch replaces the deallocateMemForFunction(Function*) method with a pair
of methods deallocateFunctionBody(void *) and deallocateExceptionTable(void *)
corresponding to the two startFoo/endFoo pairs.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84651 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 18:13:21 +00:00
Benjamin Kramer
174101e13a Random #include pruning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84632 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 11:44:38 +00:00
Daniel Dunbar
2685a29a8d Wire up the ARM MCInst printer, for llvm-mc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84600 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 05:15:36 +00:00
Dan Gohman
81b16a3558 Add getTopBlock and getBottomBlock member functions to MachineLoopInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84596 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 04:16:37 +00:00
Chris Lattner
7c5b021793 add a twine version of MCContext::GetOrCreateSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84561 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 22:49:00 +00:00
Jim Grosbach
d482f55af1 Adjust the scavenge register spilling to allow the target to choose an
appropriate restore location for the spill as well as perform the actual
save and restore.

The Thumb1 target uses this to make sure R12 is not clobbered while a spilled
scavenger register is live there.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84554 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 22:27:30 +00:00
Jeffrey Yasskin
ebbcef945d Clean up the JITResolver stub/callsite<->function maps.
The JITResolver maps Functions to their canonical stubs and all callsites for
lazily-compiled functions to their target Functions. To make Function
destruction work, I'm going to need to remove all callsites on destruction, so
this patch also adds the reverse mapping for that.

There was an incorrect assumption in here that the only stub for a function
would be the one caused by needing to lazily compile it, while x86-64 far calls
and dlsym-stubs could also cause such stubs, but I didn't look for a test case
that the assumption broke.

This also adds DenseMapInfo<AssertingVH> so I can use DenseMaps instead of
std::maps.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84522 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 18:49:59 +00:00
Chris Lattner
b2a33b4646 various cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84471 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 07:10:59 +00:00
Evan Cheng
38bdfc69cb Spill slots cannot alias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84432 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 19:58:47 +00:00
Evan Cheng
ff89dcb06f -Revert parts of 84326 and 84411. Distinquishing between fixed and non-fixed
stack slots and giving them different PseudoSourceValue's did not fix the
problem of post-alloc scheduling miscompiling llvm itself.
- Apply Dan's conservative workaround by assuming any non fixed stack slots can
alias other memory locations. This means a load from spill slot #1 cannot 
move above a store of spill slot #2. 
- Enable post-alloc scheduling for x86 at optimization leverl Default and above.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84424 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 18:16:27 +00:00
Chris Lattner
14d8038518 punctuate properly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84407 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 05:08:07 +00:00
Chris Lattner
98b532cf33 remove the IndMemRemPass, which only made sense for when malloc/free were intrinsic
instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84404 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 05:02:09 +00:00
Chris Lattner
b839c5577d add function passes for printing various dominator datastructures
accessible through opt.  Patch by Tobias Grosser!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84397 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 04:10:40 +00:00
Chris Lattner
88067b9133 make DOTGraphTraits public, patch by Tobias Grosser!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84396 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 04:09:11 +00:00
Chris Lattner
f0d24f1f59 add nodes_begin/end/iterator for dominfo, patch by Tobias Grosser!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84395 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 04:05:53 +00:00
Eric Christopher
3a8ff4c8b6 More warnings patrol: Another unused argument and more implicit
conversions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84382 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 23:56:18 +00:00
Nick Lewycky
3fc35c594c Fix test/Bindings/Ocaml/vmcore.ml. When IRBuilder::CreateMalloc was removed,
LLVMBuildMalloc was reimplemented but with the bug that it didn't insert the
resulting instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84374 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 23:52:26 +00:00
Daniel Dunbar
9bd34602fb Move UnescapeString to a static function for its sole client; its inefficient and broken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84358 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 20:43:42 +00:00
Daniel Dunbar
ca107c5c18 Remove llvm::EscapeString, raw_ostream::write_escaped is much faster.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84357 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 20:43:29 +00:00
Daniel Dunbar
522b113a75 Add raw_ostream::write_escaped, for writing escaped strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84355 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 20:43:08 +00:00
Mikhail Glushenkov
0a22fb6664 First draft of the OptionPreprocessor.
More to follow...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84352 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 20:09:29 +00:00
Daniel Dunbar
4dee7fd2c2 Move StringMap's string has function into StringExtras.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84344 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 18:21:06 +00:00
Evan Cheng
491f54f1fd Distinquish stack slots from other stack objects. They (and fixed objects) get FixedStack PseudoSourceValues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84326 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 09:20:14 +00:00
Evan Cheng
a8e6542610 Re-arrange some fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84324 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 08:57:09 +00:00
Daniel Dunbar
985577ec13 Add another required #include for freestanding .h files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84322 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 08:12:36 +00:00
Evan Cheng
6553155172 Revert 84315 for now. Re-thinking the patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84321 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 07:53:04 +00:00
Evan Cheng
bf125583f8 Rename getFixedStack to getStackObject. The stack objects represented are not
necessarily fixed. Only those will negative frame indices are "fixed."


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84315 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 06:22:26 +00:00
Daniel Dunbar
ca24a695e7 Add required #includes for freestanding .h files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84302 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 03:28:07 +00:00
Victor Hernandez
a276c603b8 Remove MallocInst from LLVM Instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84299 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 01:18:07 +00:00
Dan Gohman
b68d67caf3 Add a splice member function which accepts a range instead of a
single iterator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84294 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 00:28:24 +00:00
Victor Hernandez
13ad5aaaff Autoupgrade malloc insts to malloc calls.
Update testcases that rely on malloc insts being present.

Also prematurely remove MallocInst handling from IndMemRemoval and RaiseAllocations to help pass tests in this incremental step.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84292 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 00:00:19 +00:00
Evan Cheng
fa16354e03 Change createPostRAScheduler so it can be turned off at llc -O1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84273 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 21:06:15 +00:00
Evan Cheng
bf57b52ba4 Add a CodeGenOpt::Less level to match -O1. It'll be used by clients which do not want post-regalloc scheduling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84272 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 21:02:20 +00:00
Duncan Sands
ed90342d8a Strip trailing white space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84256 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 15:20:13 +00:00
Chris Lattner
cc4287a374 Add half precision floating point support (float16) to APFloat,
patch by Peter Johnson! (PR5195)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84239 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 02:13:51 +00:00
Chris Lattner
a43fc3452b add haiku support, patch by Paul Davey!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84238 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 02:06:30 +00:00
Daniel Dunbar
7eb85194f2 Minor formatting tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84235 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 01:58:15 +00:00
Daniel Dunbar
1253a6fa3b MC: Switch assembler API to using MCExpr instead of MCValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84234 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 01:58:03 +00:00
Daniel Dunbar
e00b011e6a MC: Remove unneeded context argument to MCExpr::Evaluate*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84233 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 01:57:52 +00:00
Daniel Dunbar
7c3600de94 MC: Move assembler variable values from MCContext to MCSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84229 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 01:33:57 +00:00
Daniel Dunbar
e579849652 MC: Switch MCContext value table to storing MCExprs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84228 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 01:33:11 +00:00