Commit Graph

48640 Commits

Author SHA1 Message Date
Devang Patel
1a8d2d2d4f Do not use Mangler to remove '1' from linkage name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75574 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 00:55:28 +00:00
Bill Wendling
91267547f7 Check for the correct unnamed name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75573 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 00:53:58 +00:00
Evan Cheng
5ad147281a Fix pr4544. When remating, make sure the destination register fits the instruction definition. It may be mismatched due to sub-register coalescing.
No test case yet because the code doesn't trigger until 75408 is re-applied.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75572 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 00:51:06 +00:00
Dale Johannesen
4458ab0d83 Don't delete asm's just because their inputs are undefined;
xor R, R is a common and valid idiom for zeroing a register, for example.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75571 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 00:45:38 +00:00
Dan Gohman
d9ef1a860e Add a newline, now that Value's operator<< doesn't print one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75568 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 00:32:49 +00:00
Dan Gohman
34468c205f FreeInst is trapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75567 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 00:32:11 +00:00
Bob Wilson
e622087e20 Fix an obvious copy-and-paste error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75566 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 00:23:44 +00:00
Bob Wilson
ab5a5a6a76 Revert 75308.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75565 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 00:16:03 +00:00
Chris Lattner
58e3e24f85 the mangler can never mangle intrinsics, don't allow this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75564 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 00:15:14 +00:00
Eli Friedman
c4b2d4a786 Fix obvious typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75563 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 00:09:42 +00:00
Bob Wilson
60206140a1 Revert 75309.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75562 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 00:01:42 +00:00
Chris Lattner
59ecdfbee3 rename Memo/Count to AnonGlobalIDs/NextAnonGlobalID to be more
descriptive.  Thange them to keep track of the ID of a global that is
assigned, not the first mangled name returned for it.  Without doing this,
we are required to always use the same suffix for a global that gets 
mangled.  This means that we can mangle the same global once with $stub
and another time with $non_lazy_ptr or whatever.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75561 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 00:01:06 +00:00
Owen Anderson
385396221b Move more functionality over to LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75559 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 23:50:59 +00:00
Chris Lattner
47728a2819 remove Mangler::getTypeID and related data, it was only used for mangling
local symbols and we haven't had type planes since llvm 1.9.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75558 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 23:50:53 +00:00
Chris Lattner
762717acb1 remove mangler support for mangling local names. Mangler should only be
used with globals.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75557 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 23:47:27 +00:00
Chris Lattner
ca1bafda1d fix CBE & MSIL backends to not use the mangler for non-global symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75556 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 23:46:46 +00:00
Chris Lattner
6dea8d31d3 don't print redundant @PLT suffixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75554 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 23:44:13 +00:00
Evan Cheng
8799dbe5b7 Revert an accidental commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75553 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 23:44:01 +00:00
Chris Lattner
ec9aa7eb95 the mangler should put suffixes on unnamed global's mangled names as well
if present.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75547 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 23:20:38 +00:00
Owen Anderson
099c28e446 Move a bit more functionality to LLVMContext, which apparently wasn't being used anyways.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75546 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 23:16:26 +00:00
Kevin Enderby
5f1f0b8f7e Added llvm-mc support for parsing the .abort directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75545 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 23:15:14 +00:00
Dan Gohman
45f91b70c4 Check in a reduced version of this testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75544 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 23:04:44 +00:00
Dan Gohman
c902e136d1 Print a newline after printing a Value, now that Value's operator<<
doesn't print a newline.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75543 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 23:03:05 +00:00
Dan Gohman
e860dcb6e4 #include "llvm/Assembly/Writer.h" to get the declaration for WriteAsOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75542 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:56:37 +00:00
Chris Lattner
d4f53b373e Two changes:
1) unique globals with the existing "Count" local in Mangler, not with
atomic nonsense.  Using atomics will give us nondeterminstic output
from the compiler when using multiple threads, which is bad.

2) Do not mangle an unknown global name with a type suffix.  We don't
   need this anymore now that llvm ir doesn't have type planes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75541 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:48:46 +00:00
Devang Patel
d84b41615e Use assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75540 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:46:19 +00:00
Eli Friedman
070a981ab7 PR4548: optimize zext+udiv+trunc to udiv.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75539 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:46:01 +00:00
Owen Anderson
a43c3aca85 Inline EvalVectorOp in order to get rid of passing-pointer-to-static-methods behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75538 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:41:06 +00:00
Bruno Cardoso Lopes
d291066879 Cleanup the global emission and refactor some code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75537 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:40:39 +00:00
Owen Anderson
db1cd5eba5 Fix the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75536 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:40:32 +00:00
Daniel Dunbar
ff79ef4c60 NewNightlyTest.pl - Add -configure-args option.
- For adding arbitrary arguments to pass to configure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75535 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:31:58 +00:00
Eli Friedman
68f74712a9 Fix bug in run-line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75534 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:31:30 +00:00
Dan Gohman
08d4ec0b20 Add testcases for PR4538, PR4537, and PR4534.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75533 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:30:31 +00:00
Chris Lattner
e2959dc2b1 clean up some syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75532 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:28:21 +00:00
Eli Friedman
709b33dc78 Canonicalize boolean +/- a constant to a select.
(I think it's reasonably clear that we want to have a canonical form for 
constructs like this; if anyone thinks that a select is not the best 
canonical form, please tell me.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75531 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:27:52 +00:00
Dan Gohman
ddf9f99a9f Fix a few assertion strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75530 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:20:53 +00:00
Dan Gohman
03ee68a145 Forward-declare Loop and LoopInfo instead of #including LoopInfo.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75529 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:19:41 +00:00
Owen Anderson
fa82b6eba4 These don't really need contexts either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75528 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:18:28 +00:00
Daniel Dunbar
0c39e3839a NewNightlyTest.pl - Add -noremoveatend option.
- Like -noremove, except the build directory is still purged prior to building
   but isn't removed at the end of the test run (so the build products can be
   examined if need be).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75527 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:17:49 +00:00
Chris Lattner
62c5c5099c eliminate a bunch of code in print_pcrel_imm for printing symbols, using
printSymbolOperand instead.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75526 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:07:30 +00:00
Dan Gohman
f5074ec963 Whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75525 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:05:32 +00:00
Dan Gohman
ba70188f89 Fix an 80-column violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75524 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:04:06 +00:00
Dan Gohman
16a2c927e9 Move isLCSSAForm, isLoopInvariant, getCanonicalInductionVariable,
and related functions out of LoopBase and into Loop, since they
are specific to BasicBlock-based loops. This also allows the code
to be moved out-of-line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75523 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:02:44 +00:00
Oscar Fuentes
6761c5d609 CMake: Refuses to work for out-of-source builds when tablegenned files
are found mixed with the sources. Fixes PR 4522.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75522 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:58:44 +00:00
Chris Lattner
f666c094e9 move a method and add a comment, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75520 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:53:19 +00:00
Dan Gohman
c8d76d5afb Make Loop and MachineLoop be subclasses of LoopBase, rather than typedefs,
using the Curiously Recurring Template Pattern with LoopBase.

This will help further refactoring, and future functionality for
Loop. Also, Headers can now foward-declare Loop, instead of pulling
in LoopInfo.h or doing tricks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75519 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:51:15 +00:00
Chris Lattner
92aa0bb4ca refactor operand printing to remove hte last of the "mem" modifier hack. The
only remaining modifier is "subreg".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75516 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:48:33 +00:00
Devang Patel
87370b8301 Use AsmPrinter's Mangler to remove leading '1' from linkage names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75515 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:48:26 +00:00
Eli Friedman
65445c5b14 Misc simplifications to InstCombiner::commonIntCastTransforms. Most of
the changes are allowed by not calling this function for bitcasts.  
The Instruction::AShr case is dead because 
SimplifyDemandedInstructionBits handles that case.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75514 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:45:57 +00:00
David Goodwin
ea670f1dd8 Fix FP elimination code to work for Thumb-2 addrmode AddrModeT2_so. This fixes SingleSource/Benchmarks/Stanford/Queens (among others).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75513 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:43:08 +00:00