Commit Graph

9120 Commits

Author SHA1 Message Date
Daniel Dunbar
3fb7eee9c2 Allow multiple registrations of the same target.
- This doesn't necessarily seem like a good idea, but the JIT unittest
   currently relies on it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75769 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 10:32:44 +00:00
Daniel Dunbar
aca81c49d9 Initialize the target info via the InitializeNativeTarget() hook.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75768 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 10:29:55 +00:00
Daniel Dunbar
e0bda7df1a Reimplement TargetMachineRegistry in terms of TargetRegistry.
- This is a temporary hack to aid in incremental refactoring, for now we
   allocate a new TargetMachineRegistryEntry on every getClosest... call.

 - No intended functionality change, other than the leaked memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75766 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 09:53:37 +00:00
Daniel Dunbar
4883630360 Mark Target's creation routines as const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75763 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 09:38:10 +00:00
Daniel Dunbar
4246790aa8 Register Target's TargetMachine and AsmPrinter in the new registry.
- This abuses TargetMachineRegistry's constructor for now, this will get
   cleaned up in time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75762 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 09:22:31 +00:00
Daniel Dunbar
7a46d7898e Fix thinko
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75760 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 08:56:49 +00:00
Daniel Dunbar
6461716b50 Include Target specific Info initialization routine when initializing all
targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75756 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 07:48:39 +00:00
Daniel Dunbar
73b3ec4134 Address some review comments on TargetRegistry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75753 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 07:09:29 +00:00
Chris Lattner
9d5511b7db eliminate the Mangler::PreserveAsmNames bit, the sole client of this
can do it perfectly well itself.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75743 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 04:50:47 +00:00
Chris Lattner
f1cfea2dbf remove printSuffixedName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75742 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 04:42:49 +00:00
Daniel Dunbar
bb06129140 Add new TargetRegistry.
Targets implement a single global Target structure which will live in a new
<Target>/TargetInfo library; this will be present in any image which the target
is usable in.
 - Optional target specific classes can then be registered and attached to the
   Target description.

 - Registration for normal Targets will be done via the initialization functions
   instead of using static constructors.

 - This allows clients to use a single interface to obtain target data, without
   requiring the code generator be linked in. It also provides a natural
   extension point for adding new optional target data (assembler parser,
   disassembler, etc.).

 - This also provides a new entry point for obtaining a target for a particular
   triple (without a module).

 - Not yet used, however this should eventually replace the TargetMachineRegistry.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75739 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 04:24:58 +00:00
Dan Gohman
bdc017edac Make makeLoopInvariant report whether it made any changes or not,
and use this to simplify more code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75722 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 01:25:43 +00:00
Dan Gohman
21da1ed4f5 llvm-c/Core.h is no longer needed in lto.h, and it brings in
several unwanted dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75717 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 00:47:00 +00:00
Chris Lattner
cd2b4c1846 Fix a fixme, patch by Ryan Flynn!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75716 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 00:36:04 +00:00
Kevin Enderby
1f049b24c7 Added llvm-mc support for parsing the .include directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75711 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 23:21:55 +00:00
Owen Anderson
9adc0abad3 Move EVER MORE stuff over to LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75703 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 23:09:55 +00:00
Kevin Enderby
711482476c Added llvm-mc support for parsing the .lsym directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75685 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 21:35:03 +00:00
Chris Lattner
001c2b433f fix a bug in my previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75678 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 20:45:41 +00:00
Chris Lattner
4a18d2f1cc allow default construction of formatted_raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75674 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 20:33:33 +00:00
David Greene
71847813bc Have asm printers use formatted_raw_ostream directly to avoid a
dynamic_cast<>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75670 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 20:18:05 +00:00
Chris Lattner
5e25dd388c 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
2009-07-14 18:58:35 +00:00
Dan Gohman
04ff239d21 Fix a typo that Edwin spotted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75661 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 18:52:00 +00:00
Dan Gohman
d51e5d0ee7 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
2009-07-14 18:48:32 +00:00
Torok Edwin
969f28dfb6 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
2009-07-14 18:44:28 +00:00
Chris Lattner
b8158acc23 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
2009-07-14 18:17:16 +00:00
Kevin Enderby
95cf30c444 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
2009-07-14 18:17:10 +00:00
Dan Gohman
6bfead3179 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
2009-07-14 18:06:25 +00:00
Torok Edwin
c23197a26f 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
2009-07-14 16:55:14 +00:00
Daniel Dunbar
41ffe6c7af 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
2009-07-14 15:57:55 +00:00
Torok Edwin
93990d775e 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
2009-07-14 12:49:22 +00:00
Daniel Dunbar
858cb8a5e0 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
2009-07-14 06:58:59 +00:00
Chris Lattner
0eac0164c2 remove renamed method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75620 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 06:22:15 +00:00
Bob Wilson
176a4ab639 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
2009-07-14 06:11:12 +00:00
Bob Wilson
86c13cd733 Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75612 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 06:09:50 +00:00
Chris Lattner
03e9dd9ffa 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
2009-07-14 06:04:35 +00:00
Lang Hames
d23f0d0451 New VNInfo alignment patch by Ryan Flynn.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75609 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 05:46:55 +00:00
Chris Lattner
1cda87c3a0 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
2009-07-14 04:50:12 +00:00
Lang Hames
1b8f70a0d3 Unbroke LiveInterval.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75588 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 02:17:17 +00:00
Lang Hames
08759c5601 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
2009-07-14 02:05:37 +00:00
Dan Gohman
a342026504 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
2009-07-14 01:06:29 +00:00
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
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
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
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
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
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
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
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
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
Dan Gohman
85b05a2e60 Reapply 75252, with a fix to avoid the infinite recursion case. The
check for avoiding re-analyzing a widening cast needed to happen
earlier, as getSCEV itself may result in a isLoopGuardedByCond query.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75511 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:35:55 +00:00
Owen Anderson
1ca29d318a As Chris pointed out, this doesn't actually need an LLVMContext to operate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75508 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:27:19 +00:00
Kevin Enderby
a5c783280f add llvm-mc support for parsing the .subsections_via_symbols directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75500 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:03:15 +00:00
Owen Anderson
73c6b7127a Move more functionality over to LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75497 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 20:58:05 +00:00
Dan Gohman
c050fd94c2 Convert SCEV from FoldingSetNode to FastFoldingSetNode. This eliminates
a bunch of redundent code in Profile methods, and prepares for upcoming
changes to do improved memoization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75494 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 20:50:19 +00:00
Dan Gohman
2e4da5e4ab Delete a spurious const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75493 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 20:46:11 +00:00
David Greene
014700c1a8 Add infrastructure to allow post instruction printing action triggers.
We'll eventually use this to print comments in asm files and do other
fun things.

This adds interfaces to the AsmPrinter and changes TableGen to invoke
the postInstructionAction when appropriate.  It also add parameters to
TargetAsmInfo to control comment layout.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75490 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 20:25:48 +00:00
Chris Lattner
b8ac841c9a Add NetBSD to the Triple class, patch by Krister Walfridsson!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75489 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 20:22:23 +00:00
Dan Gohman
d6a2aab53e Add an optional optimization to FoldingSet to allow ID values to be
stored rather than recomputed on each bucket traversal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75480 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 18:25:44 +00:00
David Greene
191cf2851b Make some more changes suggested by Chris. Manipulators go away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75472 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 16:49:27 +00:00
Owen Anderson
0a5372ed3e Begin the painful process of tearing apart the rat'ss nest that is Constants.cpp and ConstantFold.cpp.
This involves temporarily hard wiring some parts to use the global context.  This isn't ideal, but it's
the only way I could figure out to make this process vaguely incremental.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75445 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 04:09:18 +00:00
Daniel Dunbar
deb052a3dd Match declaration to definition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75440 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-12 23:50:34 +00:00
Daniel Dunbar
460d16e126 Match declaration to definition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75438 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-12 22:46:08 +00:00
Chris Lattner
eaff524670 remove llvm.part.set.* and llvm.part.select.*. They have never been
implemented in codegen, have no frontend to generate them, and are 
better implemented with pattern matching (like the ppc backend does
to generate rlwimi/rlwinm etc).

PR4543



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75430 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-12 21:08:53 +00:00
Torok Edwin
3b30a2bdca Mention that llvm_report_error() does not return.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75428 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-12 21:01:44 +00:00
Jakob Stoklund Olesen
ee787ff01a Add CCIfSRet calling convention predicate.
The blackfin calling convention uses a different register for sret arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75417 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-12 13:15:50 +00:00
Nick Lewycky
7ab2eb4a80 Make this clearer for the mathematically inclined. Thanks to Duncan Sands for
going over the text!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75414 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-12 05:44:08 +00:00
Nick Lewycky
d0cca24150 Revert r75252 which was causing some crashes at compile time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75384 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-11 20:38:25 +00:00
Torok Edwin
97c8c51f07 Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75380 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-11 20:13:58 +00:00
Torok Edwin
c25e7581b9 assert(0) -> LLVM_UNREACHABLE.
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75379 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-11 20:10:48 +00:00
Nick Lewycky
f067a23356 Clarify and simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75366 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-11 17:04:01 +00:00
Nick Lewycky
bf8c7f0adf Move a method that creates constant ranges relative to another constant range
per icmp predicate out of predsimplify and into ConstantRange.

Add another utility method that determines whether one range is a subset of
another. Combine with the former to determine whether icmp pred range, range
is known to be true or not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75357 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-11 06:15:39 +00:00
Bob Wilson
28eff96ee6 Add new vector types for 192-bit, 348-bit and 512-bit sizes.
These are needed to represent ARM Neon struct datatypes containing 2, 3 or 4
separate vectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75308 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 23:05:09 +00:00
Chris Lattner
9be3fee2bd add support for .zerofill, patch by Kevin Enderby!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75301 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 22:20:30 +00:00
David Greene
62fe47a337 Make changes suggested by Chris and eliminate newly-added raw_ostream
hooks as they're no longer needed.

The major change with this patch is to make formatted_raw_ostream usable
by any client of raw_ostream.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75283 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 21:14:44 +00:00
Jeffrey Yasskin
a93e77073f Regenerate configure after r75279.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75280 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 21:09:55 +00:00
Jeffrey Yasskin
8f6d9a729e Add a --with-oprofile flag to configure, which uses OProfile's agent
library to tell it the addresses of JITted functions.  For a
particular program, this changes the opreport -l output from:

samples %    image name        symbol name
48182  98.9729 anon (tgid:19412 range:0x7f12ccaab000-0x7f12cdaab000) anon (tgid:19412 range:0x7f12ccaab000-0x7f12cdaab000)
11     0.0226  libstdc++.so.6.0.9    /usr/lib/libstdc++.so.6.0.9

to:

samples %    image name        symbol name
24565  60.7308 19814.jo        fib_left
15365  37.9861 19814.jo        fib_right
22     0.0544  ld-2.7.so       do_lookup_x



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75279 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 21:08:20 +00:00
Dan Gohman
1afdc5f356 Remove ScalarEvolution::hasSCEV, which isn't being used, and which
breaks encapsulation. Also remove a dead prototype for setSCEV.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75272 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 20:25:29 +00:00
Evan Cheng
261ce1d5f8 Remove TargetInstrInfo::CommuteChangesDestination and added findCommutedOpIndices which returns the operand indices which are swapped (when applicable). This allows for some code clean up and future enhancements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75264 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 19:15:51 +00:00
Owen Anderson
a439ee027b Fix unit tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75262 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 18:58:29 +00:00
Chris Lattner
8b16f70a1a add missing *, patch by Peter O'Gorman!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75259 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 18:28:19 +00:00
Owen Anderson
2e4ddf6218 Push LLVMContext through the TypeBuilder API. There are no users for this in-tree, so I can't really test it.
If you're using this, and it's broken, please send patches.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75257 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 18:10:10 +00:00
Owen Anderson
c7d2ce7047 Push LLVMContext through the PatternMatch API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75255 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 17:35:01 +00:00
Dan Gohman
1b342583f6 Generalize ScalarEvolution's cast-folding code to support more kinds
of loops. Add several new functions to for working with ScalarEvolution's
add-hoc value-range analysis functionality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75252 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 16:42:52 +00:00
Evan Cheng
bfa5cf144a 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75226 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 05:20:19 +00:00
Owen Anderson
45524c58fd Finish pushing LLVMContext through the IRBuilder/ConstantFolder interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75213 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 00:49:53 +00:00
David Greene
0be4fe7ad4 Fix #include specification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75208 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 00:34:39 +00:00
Ted Kremenek
8f3cfb4c65 ImmutableMap/ImmutableSet: Allow caching of ImutAVLTree digests while the tree
is still mutable. My experiments show this reduces the amount of times we
compute a full tree digest by over 50% on very small cases, and potentially much
larger on others.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75207 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 00:33:43 +00:00
David Greene
e7800be8f0 Redesign this to avoid standard stream classes. This stream class
provides pretty -printing of comments and other such things in asm
files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75202 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 23:56:35 +00:00
Owen Anderson
333c400965 This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75200 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 23:48:35 +00:00
David Greene
53674361ef Add some hooks that a redesigned AsmStream needs to do its job. These
allow derived classes to examine the stream buffer before it's flushed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75199 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 23:43:41 +00:00
Dan Gohman
38b0644761 Revert the part of 75177 that split ConstantRange into two classes, and
merge the new functionality and unittests into ConstantRange. Thanks to
Nick Lewycky for pointing out that it isn't necessary to have two separate
classes here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75191 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 23:16:10 +00:00
Andreas Bolka
7b9547089f Fix typo, trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75179 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 22:14:25 +00:00
Dan Gohman
a3755d8d36 Add a ConstantSignedRange class, which does for signed integers
what ConstantRange does for unsigned integers. Factor out a
common base class for common functionality.

Add some new functions for performing arithmetic on constant
ranges. Some of these are currently just stubbed out with
conservative implementations.

Add unittests for ConstantRange and ConstantSignedRange.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75177 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 22:07:27 +00:00
Eli Friedman
c680ac9003 Make EXTRACT_VECTOR_ELT a bit more flexible in terms of the returned
value.  Adjust other code to deal with that correctly.  Make 
DAGTypeLegalizer::PromoteIntRes_EXTRACT_VECTOR_ELT take advantage of 
this new flexibility to simplify the code and make it deal with unusual 
vectors (like <4 x i1>) correctly.  Fixes PR3037.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75176 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 22:01:03 +00:00
Owen Anderson
5dcaceb0a6 As Chris pointed out, we don't actually need to pass the context around here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75161 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 18:44:09 +00:00