oota-llvm.git
15 years agoFix for bugpoint -remote-client
Viktor Kutuzov [Tue, 14 Jul 2009 19:10:55 +0000 (19:10 +0000)]
Fix for bugpoint -remote-client

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75665 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove some dead functions, patch by Ryan Flynn!
Chris Lattner [Tue, 14 Jul 2009 18:58:35 +0000 (18:58 +0000)]
Remove some dead functions, patch by Ryan Flynn!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75664 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoconvert this test to filecheck style
Chris Lattner [Tue, 14 Jul 2009 18:57:40 +0000 (18:57 +0000)]
convert this test to filecheck style

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75663 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a typo that Edwin spotted.
Dan Gohman [Tue, 14 Jul 2009 18:52:00 +0000 (18:52 +0000)]
Fix a typo that Edwin spotted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75661 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agohasThumb2() does not mean we are compiling for thumb, must also check isThumb().
David Goodwin [Tue, 14 Jul 2009 18:48:51 +0000 (18:48 +0000)]
hasThumb2() does not mean we are compiling for thumb, must also check isThumb().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75660 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a comment clarifying the role of getPrimitiveTypeSizeInBits.
Dan Gohman [Tue, 14 Jul 2009 18:48:32 +0000 (18:48 +0000)]
Add a comment clarifying the role of getPrimitiveTypeSizeInBits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75659 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove an extra space.
Bob Wilson [Tue, 14 Jul 2009 18:44:34 +0000 (18:44 +0000)]
Remove an extra space.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75658 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIntroduce a pointertracking pass.
Torok Edwin [Tue, 14 Jul 2009 18:44:28 +0000 (18:44 +0000)]
Introduce a pointertracking pass.
For now this only computes the allocated size of the memory pointed to by a
pointer, and offset a pointer from allocated pointer.
The actual checkLimits part will come later, after another round of review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75657 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTestcase for PR4556
Chris Lattner [Tue, 14 Jul 2009 18:42:24 +0000 (18:42 +0000)]
Testcase for PR4556

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75655 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMark as fall through.
Bill Wendling [Tue, 14 Jul 2009 18:30:04 +0000 (18:30 +0000)]
Mark as fall through.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75652 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReapply my previous asmprinter changes now with more testing and two
Chris Lattner [Tue, 14 Jul 2009 18:17:16 +0000 (18:17 +0000)]
Reapply my previous asmprinter changes now with more testing and two
additional bug fixes:

1. The bug that everyone hit was a problem in the asmprinter where it
   would remove $stub but keep the L prefix on a name when emitting the
   indirect symbol.  This is easy to fix by keeping the name of the stub
   and the name of the symbol in a StringMap instead of just keeping a
   StringSet and trying to reconstruct it late.

2. There was a problem printing the personality function.  The current
   logic to print out the personality function from the DWARF information
   is a bit of a cesspool right now that duplicates a bunch of other
   logic in the asm printer.  The short version of it is that it depends
   on emitting both the L and _ prefix for symbols (at least on darwin)
   and until I can untangle it, it is best to switch the mangler back to
   emitting both prefixes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75646 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded llvm-mc support for parsing the .desc directive.
Kevin Enderby [Tue, 14 Jul 2009 18:17:10 +0000 (18:17 +0000)]
Added llvm-mc support for parsing the .desc directive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75645 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a testcase for a bug fixed by r75634.
Dan Gohman [Tue, 14 Jul 2009 18:15:00 +0000 (18:15 +0000)]
Add a testcase for a bug fixed by r75634.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75644 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLLVM doesn't use libelf. Remove libelf configurey.
Dan Gohman [Tue, 14 Jul 2009 18:06:25 +0000 (18:06 +0000)]
LLVM doesn't use libelf. Remove libelf configurey.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75643 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert 75571; I'm convinced this isn't the right thing to do.
Dale Johannesen [Tue, 14 Jul 2009 17:48:25 +0000 (17:48 +0000)]
Revert 75571; I'm convinced this isn't the right thing to do.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75642 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.
Torok Edwin [Tue, 14 Jul 2009 16:55:14 +0000 (16:55 +0000)]
llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.
This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75640 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert r7561{9,8,7,6}, which depend on r75610.
Daniel Dunbar [Tue, 14 Jul 2009 16:25:11 +0000 (16:25 +0000)]
Revert r7561{9,8,7,6}, which depend on r75610.

--- Reverse-merging r75619 into '.':
U    lib/Target/DarwinTargetAsmInfo.cpp
U    lib/CodeGen/AsmPrinter/AsmPrinter.cpp
--- Reverse-merging r75618 into '.':
U    lib/CodeGen/ELFWriter.cpp
U    lib/CodeGen/MachOCodeEmitter.cpp
U    lib/CodeGen/MachOWriter.cpp
--- Reverse-merging r75617 into '.':
U    lib/Target/CBackend/CBackend.cpp
--- Reverse-merging r75616 into '.':
U    tools/bugpoint/Miscompilation.cpp
U    tools/lto/LTOCodeGenerator.cpp
U    tools/lto/LTOModule.cpp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75638 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert r75615, which depended on 75610.
Daniel Dunbar [Tue, 14 Jul 2009 16:12:13 +0000 (16:12 +0000)]
Revert r75615, which depended on 75610.

--- Reverse-merging r75615 into '.':
U    lib/Target/XCore/XCoreAsmPrinter.cpp
U    lib/Target/PIC16/PIC16AsmPrinter.cpp
U    lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp
U    lib/Target/MSP430/MSP430AsmPrinter.cpp
U    lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp
U    lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
U    lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
U    lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
U    lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
U    lib/Target/MSIL/MSILWriter.cpp
U    lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp
U    lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75637 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert r75610 (and r75620, which was blocking the revert), in the hopes of
Daniel Dunbar [Tue, 14 Jul 2009 15:57:55 +0000 (15:57 +0000)]
Revert r75610 (and r75620, which was blocking the revert), in the hopes of
unbreaking llvm-gcc (on Darwin).

--- Reverse-merging r75620 into '.':
U    include/llvm/Support/Mangler.h
--- Reverse-merging r75610 into '.':
U    test/CodeGen/X86/loop-hoist.ll
G    include/llvm/Support/Mangler.h
U    lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
U    lib/VMCore/Mangler.cpp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75636 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake SCEVCallbackVH::allUsesReplacedWith more thorough in removing
Dan Gohman [Tue, 14 Jul 2009 14:34:04 +0000 (14:34 +0000)]
Make SCEVCallbackVH::allUsesReplacedWith more thorough in removing
users from the Scalars map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75634 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRequire IVUsers after LCSSA, since LCSSA does not preserve IVUsers.
Dan Gohman [Tue, 14 Jul 2009 14:26:23 +0000 (14:26 +0000)]
Require IVUsers after LCSSA, since LCSSA does not preserve IVUsers.
This results in the pass manager running IVUsers only once for
indvars, instead of twice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75633 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a comment about why ScalarEvolution doesn't recognize non-loop PHIs
Dan Gohman [Tue, 14 Jul 2009 14:06:25 +0000 (14:06 +0000)]
Add a comment about why ScalarEvolution doesn't recognize non-loop PHIs
even when they're obvious.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75632 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAfter converting assert(0) to LLVM_UNREACHABLE we lost file/line location.
Torok Edwin [Tue, 14 Jul 2009 12:49:22 +0000 (12:49 +0000)]
After converting assert(0) to LLVM_UNREACHABLE we lost file/line location.
Fix by making the LLVM_UNREACHABLE pass __FILE__ and __LINE__ to
llvm_unreachable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75631 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoeliminate extra space.
Torok Edwin [Tue, 14 Jul 2009 12:22:58 +0000 (12:22 +0000)]
eliminate extra space.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75630 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd extra sign extension to the same bit width before int sign
Anton Korobeynikov [Tue, 14 Jul 2009 09:53:14 +0000 (09:53 +0000)]
Add extra sign extension to the same bit width before int sign
extension to another bit width. This is needed to get correct singed value.
Patch by Artur Pietrek!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75629 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd missing break. Patch by Artur Pietrek!
Anton Korobeynikov [Tue, 14 Jul 2009 09:52:47 +0000 (09:52 +0000)]
Add missing break. Patch by Artur Pietrek!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75628 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove main llvm-prof functionality into a ModulePass.
Daniel Dunbar [Tue, 14 Jul 2009 07:41:11 +0000 (07:41 +0000)]
Move main llvm-prof functionality into a ModulePass.
 - To support using the ProfileInfo analysis results instead of accessing the
   ProfileInfoLoader directly.

 - Based on (part of) a patch by Andreas Neustifter.

 - No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75625 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoProfileInfo interface tweaks.
Daniel Dunbar [Tue, 14 Jul 2009 06:58:59 +0000 (06:58 +0000)]
ProfileInfo interface tweaks.
 - Add getExecutionCount(const Function).

 - Add helper Edge type.

 - constify.

 - No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75623 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse http instead https for anonymous readonly check out.
Evan Cheng [Tue, 14 Jul 2009 06:23:41 +0000 (06:23 +0000)]
Use http instead https for anonymous readonly check out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75621 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove renamed method.
Chris Lattner [Tue, 14 Jul 2009 06:22:15 +0000 (06:22 +0000)]
remove renamed method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75620 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorename getValueName -> getMangledName. These two files have very
Chris Lattner [Tue, 14 Jul 2009 06:21:12 +0000 (06:21 +0000)]
rename getValueName -> getMangledName.  These two files have very
dubious looking things that I need to investigate in more detail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75619 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename getValueName -> getMangledName
Chris Lattner [Tue, 14 Jul 2009 06:20:20 +0000 (06:20 +0000)]
Rename getValueName -> getMangledName

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75618 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorename getValueName -> getMangledName
Chris Lattner [Tue, 14 Jul 2009 06:19:21 +0000 (06:19 +0000)]
rename getValueName -> getMangledName

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75617 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorename getValueName -> getMangledName
Chris Lattner [Tue, 14 Jul 2009 06:19:07 +0000 (06:19 +0000)]
rename getValueName -> getMangledName

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75616 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename getValueName -> getMangledName.
Chris Lattner [Tue, 14 Jul 2009 06:18:50 +0000 (06:18 +0000)]
Rename getValueName -> getMangledName.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75615 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove some tabs and fix other whitespace. No functional changes.
Bob Wilson [Tue, 14 Jul 2009 06:11:12 +0000 (06:11 +0000)]
Remove some tabs and fix other whitespace.  No functional changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75613 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a comment.
Bob Wilson [Tue, 14 Jul 2009 06:09:50 +0000 (06:09 +0000)]
Fix a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75612 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix an obvious error.
Bob Wilson [Tue, 14 Jul 2009 06:06:28 +0000 (06:06 +0000)]
Fix an obvious error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75611 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChange the X86 asmprinter to use the mangler to apply suffixes like "$non_lazy_ptr"
Chris Lattner [Tue, 14 Jul 2009 06:04:35 +0000 (06:04 +0000)]
Change the X86 asmprinter to use the mangler to apply suffixes like "$non_lazy_ptr"
to symbols instead of doing it with "printSuffixedName".  This gets us to the point
where there is a real separation between computing a symbol name and printing it,
something I need for MC printer stuff.

This patch also fixes a corner case bug where unnamed private globals wouldn't get
the private label prefix.

Next up, rename all uses of getValueName -> getMangledName for better greppability,
and then tackle the ppc/arm backends to eliminate "printSuffixedName".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75610 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNew VNInfo alignment patch by Ryan Flynn.
Lang Hames [Tue, 14 Jul 2009 05:46:55 +0000 (05:46 +0000)]
New VNInfo alignment patch by Ryan Flynn.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75609 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChange the internal interface to makeNameProper to take a bool that
Chris Lattner [Tue, 14 Jul 2009 04:50:12 +0000 (04:50 +0000)]
Change the internal interface to makeNameProper to take a bool that
indicates whether the label is private or not, instead of taking
prefix stuff.  One effect of this is that symbols will be generated
with *just* the private prefix, instead of both the private prefix
*and* the user-label-prefix, but this doesn't matter as long as it
is consistent.  For example we'll now get "Lfoo" instead of "L_foo".
These are just assembler temporary labels anyway, so they never even
make it into the .o file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75607 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUnbroke LiveInterval.
Lang Hames [Tue, 14 Jul 2009 02:17:17 +0000 (02:17 +0000)]
Unbroke LiveInterval.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75588 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTidy up VNInfo alignment code. Patch contributed by Ryan Flynn.
Lang Hames [Tue, 14 Jul 2009 02:05:37 +0000 (02:05 +0000)]
Tidy up VNInfo alignment code. Patch contributed by Ryan Flynn.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75587 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix trivial todo in instcombine.
Eli Friedman [Tue, 14 Jul 2009 02:01:53 +0000 (02:01 +0000)]
Fix trivial todo in instcombine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75586 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago1. In Thumb mode, select tBx instead of ARM variants.
Evan Cheng [Tue, 14 Jul 2009 01:49:27 +0000 (01:49 +0000)]
1. In Thumb mode, select tBx instead of ARM variants.
2. BX does not "use" the link register, it defines it.
3. Fix a couple more places in thumb td file that still uses pre-UAL syntax.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75585 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate LoopSimplify and LoopUnswitch to use the new makeLoopInvariant
Dan Gohman [Tue, 14 Jul 2009 01:37:59 +0000 (01:37 +0000)]
Update LoopSimplify and LoopUnswitch to use the new makeLoopInvariant
function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75584 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPort this unittest to use LLVMContext.
Dan Gohman [Tue, 14 Jul 2009 01:26:26 +0000 (01:26 +0000)]
Port this unittest to use LLVMContext.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75583 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove hack now that Evan fixed it so that the frame pointer isn't saved twice.
Bill Wendling [Tue, 14 Jul 2009 01:16:18 +0000 (01:16 +0000)]
Remove hack now that Evan fixed it so that the frame pointer isn't saved twice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75581 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix indvars to not assume that a loop with a single unique exit
Dan Gohman [Tue, 14 Jul 2009 01:09:02 +0000 (01:09 +0000)]
Fix indvars to not assume that a loop with a single unique exit
block has a single unique exiting block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75579 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIntroduce a new LoopInfo utility function makeLoopInvariant, which
Dan Gohman [Tue, 14 Jul 2009 01:06:29 +0000 (01:06 +0000)]
Introduce a new LoopInfo utility function makeLoopInvariant, which
works similar to isLoopInvariant, except that it will do trivial
hoisting to try to make the value loop invariant if it isn't already.
This makes it easier for transformation passes to clear trivial
instructions out of the way (the regular LICM pass doesn't run
until relatively late). This is code factored out of LoopSimplify
and other places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75578 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agouse getValueName instead of makeNameProper.
Chris Lattner [Tue, 14 Jul 2009 01:01:12 +0000 (01:01 +0000)]
use getValueName instead of makeNameProper.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75577 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix detection of valid BFC immediates.
David Goodwin [Tue, 14 Jul 2009 00:57:56 +0000 (00:57 +0000)]
Fix detection of valid BFC immediates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75576 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not use Mangler to remove '1' from linkage name.
Devang Patel [Tue, 14 Jul 2009 00:55:28 +0000 (00:55 +0000)]
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

15 years agoCheck for the correct unnamed name.
Bill Wendling [Tue, 14 Jul 2009 00:53:58 +0000 (00:53 +0000)]
Check for the correct unnamed name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75573 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix pr4544. When remating, make sure the destination register fits the instruction...
Evan Cheng [Tue, 14 Jul 2009 00:51:06 +0000 (00:51 +0000)]
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

15 years agoDon't delete asm's just because their inputs are undefined;
Dale Johannesen [Tue, 14 Jul 2009 00:45:38 +0000 (00:45 +0000)]
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

15 years agoAdd a newline, now that Value's operator<< doesn't print one.
Dan Gohman [Tue, 14 Jul 2009 00:32:49 +0000 (00:32 +0000)]
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

15 years agoFreeInst is trapping.
Dan Gohman [Tue, 14 Jul 2009 00:32:11 +0000 (00:32 +0000)]
FreeInst is trapping.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75567 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix an obvious copy-and-paste error.
Bob Wilson [Tue, 14 Jul 2009 00:23:44 +0000 (00:23 +0000)]
Fix an obvious copy-and-paste error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75566 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert 75308.
Bob Wilson [Tue, 14 Jul 2009 00:16:03 +0000 (00:16 +0000)]
Revert 75308.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75565 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agothe mangler can never mangle intrinsics, don't allow this.
Chris Lattner [Tue, 14 Jul 2009 00:15:14 +0000 (00:15 +0000)]
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

15 years agoFix obvious typo.
Eli Friedman [Tue, 14 Jul 2009 00:09:42 +0000 (00:09 +0000)]
Fix obvious typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75563 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert 75309.
Bob Wilson [Tue, 14 Jul 2009 00:01:42 +0000 (00:01 +0000)]
Revert 75309.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75562 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorename Memo/Count to AnonGlobalIDs/NextAnonGlobalID to be more
Chris Lattner [Tue, 14 Jul 2009 00:01:06 +0000 (00:01 +0000)]
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

15 years agoMove more functionality over to LLVMContext.
Owen Anderson [Mon, 13 Jul 2009 23:50:59 +0000 (23:50 +0000)]
Move more functionality over to LLVMContext.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75559 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove Mangler::getTypeID and related data, it was only used for mangling
Chris Lattner [Mon, 13 Jul 2009 23:50:53 +0000 (23:50 +0000)]
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

15 years agoremove mangler support for mangling local names. Mangler should only be
Chris Lattner [Mon, 13 Jul 2009 23:47:27 +0000 (23:47 +0000)]
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

15 years agofix CBE & MSIL backends to not use the mangler for non-global symbols.
Chris Lattner [Mon, 13 Jul 2009 23:46:46 +0000 (23:46 +0000)]
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

15 years agodon't print redundant @PLT suffixes
Chris Lattner [Mon, 13 Jul 2009 23:44:13 +0000 (23:44 +0000)]
don't print redundant @PLT suffixes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75554 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert an accidental commit.
Evan Cheng [Mon, 13 Jul 2009 23:44:01 +0000 (23:44 +0000)]
Revert an accidental commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75553 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agothe mangler should put suffixes on unnamed global's mangled names as well
Chris Lattner [Mon, 13 Jul 2009 23:20:38 +0000 (23:20 +0000)]
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

15 years agoMove a bit more functionality to LLVMContext, which apparently wasn't being used...
Owen Anderson [Mon, 13 Jul 2009 23:16:26 +0000 (23:16 +0000)]
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

15 years agoAdded llvm-mc support for parsing the .abort directive.
Kevin Enderby [Mon, 13 Jul 2009 23:15:14 +0000 (23:15 +0000)]
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

15 years agoCheck in a reduced version of this testcase.
Dan Gohman [Mon, 13 Jul 2009 23:04:44 +0000 (23:04 +0000)]
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

15 years agoPrint a newline after printing a Value, now that Value's operator<<
Dan Gohman [Mon, 13 Jul 2009 23:03:05 +0000 (23:03 +0000)]
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

15 years ago#include "llvm/Assembly/Writer.h" to get the declaration for WriteAsOperand.
Dan Gohman [Mon, 13 Jul 2009 22:56:37 +0000 (22:56 +0000)]
#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

15 years agoTwo changes:
Chris Lattner [Mon, 13 Jul 2009 22:48:46 +0000 (22:48 +0000)]
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

15 years agoUse assertion.
Devang Patel [Mon, 13 Jul 2009 22:46:19 +0000 (22:46 +0000)]
Use assertion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75540 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPR4548: optimize zext+udiv+trunc to udiv.
Eli Friedman [Mon, 13 Jul 2009 22:46:01 +0000 (22:46 +0000)]
PR4548: optimize zext+udiv+trunc to udiv.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75539 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInline EvalVectorOp in order to get rid of passing-pointer-to-static-methods behavior.
Owen Anderson [Mon, 13 Jul 2009 22:41:06 +0000 (22:41 +0000)]
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

15 years agoCleanup the global emission and refactor some code
Bruno Cardoso Lopes [Mon, 13 Jul 2009 22:40:39 +0000 (22:40 +0000)]
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

15 years agoFix the build.
Owen Anderson [Mon, 13 Jul 2009 22:40:32 +0000 (22:40 +0000)]
Fix the build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75536 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNewNightlyTest.pl - Add -configure-args option.
Daniel Dunbar [Mon, 13 Jul 2009 22:31:58 +0000 (22:31 +0000)]
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

15 years agoFix bug in run-line.
Eli Friedman [Mon, 13 Jul 2009 22:31:30 +0000 (22:31 +0000)]
Fix bug in run-line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75534 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd testcases for PR4538, PR4537, and PR4534.
Dan Gohman [Mon, 13 Jul 2009 22:30:31 +0000 (22:30 +0000)]
Add testcases for PR4538, PR4537, and PR4534.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75533 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoclean up some syntax.
Chris Lattner [Mon, 13 Jul 2009 22:28:21 +0000 (22:28 +0000)]
clean up some syntax.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75532 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCanonicalize boolean +/- a constant to a select.
Eli Friedman [Mon, 13 Jul 2009 22:27:52 +0000 (22:27 +0000)]
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

15 years agoFix a few assertion strings.
Dan Gohman [Mon, 13 Jul 2009 22:20:53 +0000 (22:20 +0000)]
Fix a few assertion strings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75530 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoForward-declare Loop and LoopInfo instead of #including LoopInfo.h.
Dan Gohman [Mon, 13 Jul 2009 22:19:41 +0000 (22:19 +0000)]
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

15 years agoThese don't really need contexts either.
Owen Anderson [Mon, 13 Jul 2009 22:18:28 +0000 (22:18 +0000)]
These don't really need contexts either.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75528 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNewNightlyTest.pl - Add -noremoveatend option.
Daniel Dunbar [Mon, 13 Jul 2009 22:17:49 +0000 (22:17 +0000)]
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

15 years agoeliminate a bunch of code in print_pcrel_imm for printing symbols, using
Chris Lattner [Mon, 13 Jul 2009 22:07:30 +0000 (22:07 +0000)]
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

15 years agoWhitespace cleanups.
Dan Gohman [Mon, 13 Jul 2009 22:05:32 +0000 (22:05 +0000)]
Whitespace cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75525 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix an 80-column violation.
Dan Gohman [Mon, 13 Jul 2009 22:04:06 +0000 (22:04 +0000)]
Fix an 80-column violation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75524 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove isLCSSAForm, isLoopInvariant, getCanonicalInductionVariable,
Dan Gohman [Mon, 13 Jul 2009 22:02:44 +0000 (22:02 +0000)]
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

15 years agoCMake: Refuses to work for out-of-source builds when tablegenned files
Oscar Fuentes [Mon, 13 Jul 2009 21:58:44 +0000 (21:58 +0000)]
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

15 years agomove a method and add a comment, no functionality change.
Chris Lattner [Mon, 13 Jul 2009 21:53:19 +0000 (21:53 +0000)]
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

15 years agoMake Loop and MachineLoop be subclasses of LoopBase, rather than typedefs,
Dan Gohman [Mon, 13 Jul 2009 21:51:15 +0000 (21:51 +0000)]
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

15 years agorefactor operand printing to remove hte last of the "mem" modifier hack. The
Chris Lattner [Mon, 13 Jul 2009 21:48:33 +0000 (21:48 +0000)]
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

15 years agoUse AsmPrinter's Mangler to remove leading '1' from linkage names.
Devang Patel [Mon, 13 Jul 2009 21:48:26 +0000 (21:48 +0000)]
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