Commit Graph

8689 Commits

Author SHA1 Message Date
Chris Lattner
0b3735e65a remove a couple of actively incorrect uses of getMangledName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93627 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 02:16:09 +00:00
Bill Wendling
d58e9cb42d Retrying r91337:
The CIE says that the LSDA point in the FDE section is an "sdata4". That's fine,
but we need it to actually be 4-bytes in the FDE for some platforms. Allow
individual platforms to decide for themselves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93616 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 01:40:55 +00:00
Chris Lattner
10595490cc fix inverted conditional
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93614 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 01:37:14 +00:00
Chris Lattner
412c3a5bc9 CurrentFnName is now dead, remove it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93612 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 01:24:10 +00:00
Chris Lattner
5c40e694dc remove the string form of printVisibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93609 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 01:17:26 +00:00
Bob Wilson
cb44b28f4d Treat indirect branches specially only during pre-regalloc tail duplication,
not during the later post-alloc tail duplication.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93600 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 00:42:25 +00:00
Bob Wilson
516ab96de3 Run the pre-register allocation tail duplication pass by default. Remove
the -pre-regalloc-taildup command-line option, and add a new
-disable-early-taildup option.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93597 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 00:29:50 +00:00
Chris Lattner
d1947ed2f8 supplement CurrentFnName with CurrentFnSym, which will eventually
replace it.  Upgrade Alpha, Blackfin, and part of CellSPU to not
use mangler anymore.  CellSPU needs more invasive surgery.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93589 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 23:55:16 +00:00
Chris Lattner
53d4d78d9a add a version of AsmPrinter::printVisibility that takes an MCSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93587 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 23:38:51 +00:00
Chris Lattner
d588b97cc9 add another helper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93577 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 23:25:11 +00:00
Chris Lattner
6b04edee11 add a AsmPrinter::GetGlobalValueSymbol and GetExternalSymbolSymbol
helper method, use it to simplify some code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93575 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 23:18:17 +00:00
Ted Kremenek
11f30b0131 Update CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93571 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 22:59:46 +00:00
Devang Patel
167207a99b Add FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93562 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 22:08:16 +00:00
Jakob Stoklund Olesen
33cc8d6b55 Don't make changes to the MBB in MachineBasicBlock::canFallThrough().
This fixes the regression for -pre-regalloc-taildup in
MultiSource/Applications/lambda-0.1.3.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93541 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 20:00:12 +00:00
Jakob Stoklund Olesen
057d53993c Simplify logic. Any functional change is unintended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93540 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 19:59:57 +00:00
David Greene
ac931c011f Add some debug routines to SelectionDAG to dump full DAGs.
print/dumpWithDepth allows one to dump a DAG up to N levels deep.
dump/printWithFullDepth prints the whole DAG, subject to a depth limit
on 100 in the default case (to prevent infinite recursion).

Have CannotYetSelect to a dumpWithFullDepth so it is clearer exactly
what the non-matching DAG looks like.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93538 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 19:43:23 +00:00
Victor Hernandez
3a32865d58 Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare.
It also strips old llvm.dbg.declare intrinsics that did not pass metadata as the first argument.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93531 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 19:04:09 +00:00
Nate Begeman
3fe980b127 Hook up llc's -filetype=obj to use MCStreamer if an MCCodeEmitter is available.
Remove most of old Mach-O Writer support, it has been replaced by MCMachOStreamer

Further refactoring to completely remove MachOWriter and drive the object file
writer with the AsmPrinter MCInst/MCSection logic is forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93527 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 18:51:18 +00:00
Victor Hernandez
5f03238d62 Revert r93504 because older uses of llvm.dbg.declare intrinsics need to be auto-upgraded
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93515 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 17:36:47 +00:00
Bob Wilson
bfdcf3bd49 Change pre-regalloc tail duplication to only duplicate indirect branch blocks.
The pre-regalloc pass caused some regressions in both compile time and
performance of the generated code, and it did not improve performance, except
for indirect branches.  I also moved the check for single-block loops to speed
up the common case when running the taildup pass before reg allocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93505 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 06:29:17 +00:00
Victor Hernandez
283ba2fbb4 Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93504 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 03:37:48 +00:00
Devang Patel
c9b16cc108 Do not use AT_specification die for static variables. It confuses gdb.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93494 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 01:12:22 +00:00
Jim Grosbach
f4549b02a7 fix 80-column violations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93487 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 00:36:15 +00:00
Jim Grosbach
03825f8401 Fix 80 column violations and clean up whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93484 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 00:32:47 +00:00
Devang Patel
f8b72ca6c8 Do not emit multiple AT_container_type attributes.
We need to find a better way to emit this info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93481 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 00:26:31 +00:00
Dale Johannesen
cf0b76649b Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93463 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 21:50:17 +00:00
Jim Grosbach
86e69fa901 Add comment explaining the necessity of r93456
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93459 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 21:38:31 +00:00
Jim Grosbach
9f82da7cbf Dwarf EH prepare needs to be run after SjLj prepare. Otherwise,
catch info can get misplaced when a selector ends up more than one block
removed from the parent invoke(s). This could happen when a landing pad is
shared by multiple invokes and is also a target of a normal edge from
elsewhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93456 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 21:22:16 +00:00
Dan Gohman
ff00a55517 Fix a codegen abort seen in 483.xalancbmk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93417 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 03:08:49 +00:00
Evan Cheng
eb18812f75 Commit some changes I had managed to lose last night while refactoring the code. Avoid change use of PHI instructions because it's not legal to insert any instructions before them.
This fixes PR6027.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93335 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 19:16:39 +00:00
Evan Cheng
81d22d87de Re-enable extension optimization pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93313 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 08:45:40 +00:00
Evan Cheng
d89d5180d1 Add comment; refactor; avoid pulling in DT if it's not used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93306 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 07:59:13 +00:00
Chris Lattner
2f8cc26be4 remove uses of deprecated functions, this generates slightly
different BlockAddress labels, but nothing semantically important.

Add a FIXME that BlockAddress codegen is broken if the LLVM BB has 
an empty name (e.g. strip was run).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93303 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 07:30:49 +00:00
Chris Lattner
dfbcb8c38b use the new form of getNameWithPrefix, not makeNameProper.
Among other things, this would do very weird things if the 
basic block name had (e.g.) a space in it on darwin:
makeNameProper would add quotes, then the mcsymbol would 
escape the quotes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93302 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 07:16:53 +00:00
Chris Lattner
4813035b72 change Mangler::makeNameProper to return its result in a SmallVector
instead of returning it in an std::string.  Based on this change:

1. Change TargetLoweringObjectFileCOFF::getCOFFSection to take a StringRef
2. Change a bunch of targets to call makeNameProper with a smallstring,
   making several of them *much* more efficient.
3. Rewrite Mangler::makeNameProper to not build names and then prepend
   prefixes, not use temporary std::strings, and to avoid other crimes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93298 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 06:38:18 +00:00
Chris Lattner
38c2b0a99c fix assert in AsmPrinter::EmitGlobalConstantLargeInt to match reality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93293 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 04:39:46 +00:00
Chris Lattner
5979dfff8e reduce nesting and code duplication in AsmPrinter::EmitGlobalConstantLargeInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93292 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 04:38:16 +00:00
Chris Lattner
3cc3a00570 reduce indentation and add a fast-path to EmitGlobalConstant for 8-byte
integers on 64-bit systems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93291 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 04:34:19 +00:00
Chris Lattner
fe0e7ed6b0 reduce indentation and use early exits in AsmPrinter::EmitConstantValueOnly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93290 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 04:29:19 +00:00
Evan Cheng
262a96edb4 Disable opt-ext pass to unbreak the build for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93286 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 01:51:43 +00:00
Evan Cheng
d9e385f411 Remove debug option I accidentally left in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93285 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 01:43:20 +00:00
Ted Kremenek
ce3ad1565a Update CMake file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93283 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 01:02:47 +00:00
Evan Cheng
7da9ecf967 Add a quick pass to optimize sign / zero extension instructions. For targets where the pre-extension values are available in the subreg of the result of the extension, replace the uses of the pre-extension value with the result + extract_subreg.
For now, this pass is fairly conservative. It only perform the replacement when both the pre- and post- extension values are used in the block. It will miss cases where the post-extension values are live, but not used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93278 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 00:30:23 +00:00
Dale Johannesen
5f72a5ebc8 Further progration of metadata operands. The
dumper doesn't really do what I want yet, but
at least it doesn't crash now.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93272 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 00:00:24 +00:00
Bob Wilson
86af655521 Fix a comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93261 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 22:18:56 +00:00
Dan Gohman
21c14e3649 Update a partially obsolete comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93228 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 04:32:35 +00:00
Dan Gohman
5c9cf19d1e Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93227 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 04:30:26 +00:00
Jakob Stoklund Olesen
dd437ba15e Avoid adding PHI arguments for a predecessor that has gone away when a BRCOND was constant folded.
This fixes PR5980.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93184 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 21:02:33 +00:00
Mon P Wang
fe240b1066 Disable transformation of select of two loads to a select of address and then a load if the
loads are not in the default address space because the transformation discards src value info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93180 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 20:12:49 +00:00
Devang Patel
23598502ef s/NextValueNo/NextMDValueNo while processing metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93165 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 18:52:33 +00:00