oota-llvm.git
15 years agoFix MSVC build.
Benjamin Kramer [Thu, 29 Oct 2009 12:55:32 +0000 (12:55 +0000)]
Fix MSVC build.

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

15 years agoApply some cleanups. No functionality changes.
Nick Lewycky [Thu, 29 Oct 2009 07:35:15 +0000 (07:35 +0000)]
Apply some cleanups. No functionality changes.

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

15 years agoadd sanity check for indbr.
Chris Lattner [Thu, 29 Oct 2009 05:53:32 +0000 (05:53 +0000)]
add sanity check for indbr.

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

15 years agojust for the hell of it, allow globalopt to statically evaluate
Chris Lattner [Thu, 29 Oct 2009 05:51:50 +0000 (05:51 +0000)]
just for the hell of it, allow globalopt to statically evaluate
static constructors with indirect gotos :)

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

15 years agoadd interpreter support for indirect goto / blockaddress. The interpreter
Chris Lattner [Thu, 29 Oct 2009 05:26:09 +0000 (05:26 +0000)]
add interpreter support for indirect goto / blockaddress.  The interpreter
now correctly runs clang's test/CodeGen/indirect-goto.c.  The JIT will abort
on it until someone feels compelled to implement this.

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

15 years agoadd newline to make cl.exe happy.
Zhongxing Xu [Thu, 29 Oct 2009 05:07:14 +0000 (05:07 +0000)]
add newline to make cl.exe happy.

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

15 years agofix 80-col.
Zhongxing Xu [Thu, 29 Oct 2009 04:41:24 +0000 (04:41 +0000)]
fix 80-col.

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

15 years agogreatly improve the LLVM IR bitcode encoding documentation,
Chris Lattner [Thu, 29 Oct 2009 04:25:46 +0000 (04:25 +0000)]
greatly improve the LLVM IR bitcode encoding documentation,
patch by Peter Housel!

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

15 years agoExplicitly convert to double to suppress Visual C++ 2008 build error C2668 pow is...
Zhongxing Xu [Thu, 29 Oct 2009 03:43:06 +0000 (03:43 +0000)]
Explicitly convert to double to suppress Visual C++ 2008 build error C2668 pow is ambiguous call to overloaded function

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

15 years agoTo get more thorough testing from llc-beta nightly runs, do dynamic stack
Jim Grosbach [Thu, 29 Oct 2009 02:41:21 +0000 (02:41 +0000)]
To get more thorough testing from llc-beta nightly runs, do dynamic stack
realignment regardless of whether it's strictly necessary.

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

15 years agoWhen the function is doing dynamic stack realignment, the spill slot will be
Jim Grosbach [Thu, 29 Oct 2009 02:33:47 +0000 (02:33 +0000)]
When the function is doing dynamic stack realignment, the spill slot will be
indexed via the stack pointer, even if a frame pointer is present. Update the
heuristic to place it nearest the stack pointer in that case, rather than
nearest the frame pointer.

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

15 years agoSorry to break the build.
Johnny Chen [Thu, 29 Oct 2009 02:04:53 +0000 (02:04 +0000)]
Sorry to break the build.
I was trying to check the WIP file to some local repository, but ended up
checking in the llvm repository.  Oops!

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

15 years agoMinor tweak to forgo the the curly braces for most case blocks, except when
Johnny Chen [Thu, 29 Oct 2009 01:45:07 +0000 (01:45 +0000)]
Minor tweak to forgo the the curly braces for most case blocks, except when
declaring local variables.

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

15 years agoteach various passes about blockaddress. We no longer
Chris Lattner [Thu, 29 Oct 2009 01:21:20 +0000 (01:21 +0000)]
teach various passes about blockaddress.  We no longer
crash on any clang tests.

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

15 years agoWhen there is a 2-instruction spill sequence, record
Dale Johannesen [Thu, 29 Oct 2009 01:15:40 +0000 (01:15 +0000)]
When there is a 2-instruction spill sequence, record
the second (store) instruction in SpillSlotToUsesMap
consistently.  I don't think this matters functionally,
but it's cleaner and Evan wants it this way.

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

15 years agoDon't put in these EH changes.
Bill Wendling [Thu, 29 Oct 2009 00:37:35 +0000 (00:37 +0000)]
Don't put in these EH changes.

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

15 years agoA switch-on-string-literal construct that is a nice alternative to
Douglas Gregor [Thu, 29 Oct 2009 00:34:30 +0000 (00:34 +0000)]
A switch-on-string-literal construct that is a nice alternative to
cascading "ifs" of strcmps/memcmps.

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

15 years agoteach ValueMapper about BlockAddress', making bugpoint a lot more useful.
Chris Lattner [Thu, 29 Oct 2009 00:31:02 +0000 (00:31 +0000)]
teach ValueMapper about BlockAddress', making bugpoint a lot more useful.

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

15 years agounindent massive blocks, no functionality change.
Chris Lattner [Thu, 29 Oct 2009 00:28:30 +0000 (00:28 +0000)]
unindent massive blocks, no functionality change.

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

15 years agoReverting r85338 for now. It's causing a bootstrap failure on PPC darwin9.
Bill Wendling [Thu, 29 Oct 2009 00:22:16 +0000 (00:22 +0000)]
Reverting r85338 for now. It's causing a bootstrap failure on PPC darwin9.

--- Reverse-merging r85338 into '.':
U    lib/CodeGen/SimpleRegisterCoalescing.cpp
U    lib/CodeGen/SimpleRegisterCoalescing.h

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

15 years agoAdd indirectbr and blockaddress to the vim syntax highlighting file.
Dan Gohman [Thu, 29 Oct 2009 00:14:44 +0000 (00:14 +0000)]
Add indirectbr and blockaddress to the vim syntax highlighting file.

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

15 years agoAdd a hasAddressTaken for BasicBlock.
Dan Gohman [Thu, 29 Oct 2009 00:09:08 +0000 (00:09 +0000)]
Add a hasAddressTaken for BasicBlock.

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

15 years agoadd IRBuilder support for IndirectBr
Chris Lattner [Wed, 28 Oct 2009 23:25:00 +0000 (23:25 +0000)]
add IRBuilder support for IndirectBr

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

15 years agoReimplement BranchFolding change to avoid tail merging for a 1 instruction
Bob Wilson [Wed, 28 Oct 2009 22:10:20 +0000 (22:10 +0000)]
Reimplement BranchFolding change to avoid tail merging for a 1 instruction
common tail, except when the OptimizeForSize function attribute is present.
Radar 7338114.

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

15 years agoWhen we generate spill code, then decide we don't need
Dale Johannesen [Wed, 28 Oct 2009 21:56:18 +0000 (21:56 +0000)]
When we generate spill code, then decide we don't need
to spill after all, we weren't handling 2-instruction
spill sequences correctly (PPC Altivec).  We need to
remove the store in this case.  Removing the other
instruction(s) would be goodness but is not needed for
correctness, and isn't done here.  7331562.

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

15 years agoMake sure we return the right sized type here.
Eric Christopher [Wed, 28 Oct 2009 21:32:16 +0000 (21:32 +0000)]
Make sure we return the right sized type here.

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

15 years agoRevert r85346 change to control tail merging by CodeGenOpt::Level.
Bob Wilson [Wed, 28 Oct 2009 20:46:46 +0000 (20:46 +0000)]
Revert r85346 change to control tail merging by CodeGenOpt::Level.
I'm going to redo this using the OptimizeForSize function attribute.

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

15 years agoExtend getMallocArraySize() to determine the array size if the malloc argument is:
Victor Hernandez [Wed, 28 Oct 2009 20:18:55 +0000 (20:18 +0000)]
Extend getMallocArraySize() to determine the array size if the malloc argument is:
ArraySize * ElementSize
ElementSize * ArraySize
ArraySize << log2(ElementSize)
ElementSize << log2(ArraySize)

Refactor isArrayMallocHelper and delete isSafeToGetMallocArraySize, so that there is only 1 copy of the malloc array determining logic.
Update users of getMallocArraySize() to not bother calling isArrayMalloc() as well.

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

15 years agoFix to pass options from Gold plugin to LTO codegen
Viktor Kutuzov [Wed, 28 Oct 2009 18:55:55 +0000 (18:55 +0000)]
Fix to pass options from Gold plugin to LTO codegen

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

15 years agoTeach cmake that mk[sd]temp is defined in stdlib.h on some systems.
Benjamin Kramer [Wed, 28 Oct 2009 18:37:31 +0000 (18:37 +0000)]
Teach cmake that mk[sd]temp is defined in stdlib.h on some systems.
This fixes parallel build with clang on glibc platforms.

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

15 years agoMake AntiDepReg.h internal.
David Goodwin [Wed, 28 Oct 2009 18:29:54 +0000 (18:29 +0000)]
Make AntiDepReg.h internal.

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

15 years agoAdd a Thumb BRIND pattern. Change the ARM BRIND assembly to separate the
Bob Wilson [Wed, 28 Oct 2009 18:26:41 +0000 (18:26 +0000)]
Add a Thumb BRIND pattern.  Change the ARM BRIND assembly to separate the
opcode and operand with a tab.  Check for these instructions in the usual
places.

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

15 years agofconsts and fconstd are obviously re-materializable.
Evan Cheng [Wed, 28 Oct 2009 18:19:56 +0000 (18:19 +0000)]
fconsts and fconstd are obviously re-materializable.

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

15 years agoCleanup now that frame index scavenging via post-pass is working for ARM and Thumb2.
Jim Grosbach [Wed, 28 Oct 2009 17:33:28 +0000 (17:33 +0000)]
Cleanup now that frame index scavenging via post-pass is working for ARM and Thumb2.

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

15 years agollvm.dbg.global_variables do not exist anymore.
Devang Patel [Wed, 28 Oct 2009 16:51:52 +0000 (16:51 +0000)]
llvm.dbg.global_variables do not exist anymore.

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

15 years agoadd a new 'SetCurrentDebugType' API (requested by Andrew Haley for JIT
Chris Lattner [Wed, 28 Oct 2009 15:32:19 +0000 (15:32 +0000)]
add a new 'SetCurrentDebugType' API (requested by Andrew Haley for JIT
stuff) to programmatically control the current debug flavor.  While
I'm at it, doxygenate Debug.h and clean it up.

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

15 years agoDon't call SDNode::isPredecessorOf when it isn't necessary. If the load's
Dan Gohman [Wed, 28 Oct 2009 15:28:02 +0000 (15:28 +0000)]
Don't call SDNode::isPredecessorOf when it isn't necessary. If the load's
chains have no users, they can't be predecessors of the condition.

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

15 years agoSimplify this code: if the unfolded load can't be hoisted, just delete
Dan Gohman [Wed, 28 Oct 2009 15:23:36 +0000 (15:23 +0000)]
Simplify this code: if the unfolded load can't be hoisted, just delete
the new instructions and leave the old one in place.

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

15 years agoNo newline at end of file.
Edward O'Callaghan [Wed, 28 Oct 2009 15:04:53 +0000 (15:04 +0000)]
No newline at end of file.

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

15 years agoUpdate CMake file.
Benjamin Kramer [Wed, 28 Oct 2009 13:29:18 +0000 (13:29 +0000)]
Update CMake file.

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

15 years agouse metavariable <result> instead of SSA name %result for consistency
Gabor Greif [Wed, 28 Oct 2009 13:14:50 +0000 (13:14 +0000)]
use metavariable <result> instead of SSA name %result for consistency

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

15 years agoooops, SSA name should not be part of the link
Gabor Greif [Wed, 28 Oct 2009 13:05:07 +0000 (13:05 +0000)]
ooops, SSA name should not be part of the link

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

15 years agoadvertise new syntax for unnamed instructions
Gabor Greif [Wed, 28 Oct 2009 09:21:30 +0000 (09:21 +0000)]
advertise new syntax for unnamed instructions
and eliminate confusing double-use of SSA names
(work in progress)

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

15 years agoTreat lifetime begin/end markers as allocations/frees respectively for the
Owen Anderson [Wed, 28 Oct 2009 07:05:35 +0000 (07:05 +0000)]
Treat lifetime begin/end markers as allocations/frees respectively for the
purposes for GVN/DSE.

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

15 years agoAdd ABCD, a generalized implementation of the Elimination of Array Bounds
Nick Lewycky [Wed, 28 Oct 2009 07:03:15 +0000 (07:03 +0000)]
Add ABCD, a generalized implementation of the Elimination of Array Bounds
Checks on Demand algorithm which looks at arbitrary branches instead of loop
iterations. This is GSoC work by Andre Tavares with only editorial changes
applied!

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

15 years agoGive ARMISD::EH_SJLJ_LONGJMP and EH_SJLJ_SETJMP names.
Evan Cheng [Wed, 28 Oct 2009 06:55:03 +0000 (06:55 +0000)]
Give ARMISD::EH_SJLJ_LONGJMP and EH_SJLJ_SETJMP names.

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

15 years agoBe more careful about invariance reasoning on "store" queries. Stores still need
Owen Anderson [Wed, 28 Oct 2009 06:30:52 +0000 (06:30 +0000)]
Be more careful about invariance reasoning on "store" queries.  Stores still need
to depend on Ref and ModRef calls within the invariant region.

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

15 years agoX86 palignr intrinsics immediate field is in bits. ISel must transform it into bytes.
Evan Cheng [Wed, 28 Oct 2009 06:30:34 +0000 (06:30 +0000)]
X86 palignr intrinsics immediate field is in bits. ISel must transform it into bytes.

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

15 years agoAdd trivial support for the invariance intrinsics to memdep. This logic is
Owen Anderson [Wed, 28 Oct 2009 06:18:42 +0000 (06:18 +0000)]
Add trivial support for the invariance intrinsics to memdep.  This logic is
purely local for now.

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

15 years agoadd bitcode reader support for blockaddress. We can now fully
Chris Lattner [Wed, 28 Oct 2009 05:53:48 +0000 (05:53 +0000)]
add bitcode reader support for blockaddress.  We can now fully
round trip blockaddress through .ll and .bc files, so add a testcase.

There are still a bunch of places in the optimizer and other places
that need to be updated to work with these constructs, but at least
the basics are in now.

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

15 years agobitcode writer support for blockaddress.
Chris Lattner [Wed, 28 Oct 2009 05:24:40 +0000 (05:24 +0000)]
bitcode writer support for blockaddress.

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

15 years agoPreviously, all operands to Constant were themselves constant.
Chris Lattner [Wed, 28 Oct 2009 05:14:34 +0000 (05:14 +0000)]
Previously, all operands to Constant were themselves constant.
In the new world order, BlockAddress can have a BasicBlock operand.
This doesn't permute much, because if you have a ConstantExpr (or
anything more specific than Constant) we still know the operand has
to be a Constant.

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

15 years agodoc bug spotted by apinski
Chris Lattner [Wed, 28 Oct 2009 04:47:06 +0000 (04:47 +0000)]
doc bug spotted by apinski

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

15 years ago'static const void *X = &&y' can only be put in the
Chris Lattner [Wed, 28 Oct 2009 04:12:16 +0000 (04:12 +0000)]
'static const  void *X = &&y' can only be put in the
readonly section if a reference to the containing function
is valid in the readonly section.

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

15 years agoRewrite SelectionDAG::isPredecessorOf to be iterative instead of
Dan Gohman [Wed, 28 Oct 2009 03:44:30 +0000 (03:44 +0000)]
Rewrite SelectionDAG::isPredecessorOf to be iterative instead of
recursive to avoid consuming extraordinary amounts of stack space
when processing tall graphs.

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

15 years agofull asmparser support for blockaddress. We can now do:
Chris Lattner [Wed, 28 Oct 2009 03:39:23 +0000 (03:39 +0000)]
full asmparser support for blockaddress.  We can now do:
$ llvm-as foo.ll -d -disable-output

which reads and prints the .ll file.  BC encoding is the
next project.  Testcase will go in once that works.

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

15 years agoasmprinter support for BlockAddress.
Chris Lattner [Wed, 28 Oct 2009 03:38:12 +0000 (03:38 +0000)]
asmprinter support for BlockAddress.

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

15 years agowhen we tear down a module, we need to be careful to
Chris Lattner [Wed, 28 Oct 2009 03:37:35 +0000 (03:37 +0000)]
when we tear down a module, we need to be careful to
zap BlockAddress values.

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

15 years agobasic blocks can now have non-instruction users.
Chris Lattner [Wed, 28 Oct 2009 03:36:44 +0000 (03:36 +0000)]
basic blocks can now have non-instruction users.

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

15 years agoTeach MachineLICM to unfold loads from constant memory from
Dan Gohman [Wed, 28 Oct 2009 03:21:57 +0000 (03:21 +0000)]
Teach MachineLICM to unfold loads from constant memory from
otherwise unhoistable instructions in order to allow the loads
to be hoisted.

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

15 years agoUse fconsts and fconstd to materialize small fp constants.
Evan Cheng [Wed, 28 Oct 2009 01:44:26 +0000 (01:44 +0000)]
Use fconsts and fconstd to materialize small fp constants.

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

15 years agoAdd a second ValueType argument to isFPImmLegal.
Evan Cheng [Wed, 28 Oct 2009 01:43:28 +0000 (01:43 +0000)]
Add a second ValueType argument to isFPImmLegal.

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

15 years agoMark dead physregdefs dead immediately. This helps MachineSink and
Dan Gohman [Wed, 28 Oct 2009 01:13:53 +0000 (01:13 +0000)]
Mark dead physregdefs dead immediately. This helps MachineSink and
MachineLICM and other things which run before LiveVariables is run.

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

15 years agoAllow constants of different types to share constant pool entries
Dan Gohman [Wed, 28 Oct 2009 01:12:16 +0000 (01:12 +0000)]
Allow constants of different types to share constant pool entries
if they have compatible encodings.

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

15 years agoRemove getIEEEFloatParts and getIEEEDoubleParts. They are not needed.
Evan Cheng [Wed, 28 Oct 2009 01:08:17 +0000 (01:08 +0000)]
Remove getIEEEFloatParts and getIEEEDoubleParts. They are not needed.

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

15 years agoUpdate SystemZ to use PSW following the way x86 uses EFLAGS. Besides
Dan Gohman [Wed, 28 Oct 2009 00:55:57 +0000 (00:55 +0000)]
Update SystemZ to use PSW following the way x86 uses EFLAGS. Besides
eliminating a use of MVT::Flag, this is needed for an upcoming CodeGen
change.

This unfortunately requires SystemZ to switch to the list-burr
scheduler, in order to handle the physreg defs properly, however
that's what LLVM has available at this time.

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

15 years agoAdd an indirect branch pattern for ARM. Testcase will be coming soon.
Bob Wilson [Wed, 28 Oct 2009 00:37:03 +0000 (00:37 +0000)]
Add an indirect branch pattern for ARM.  Testcase will be coming soon.

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

15 years agoFix the ModuleDeletion test on PPC and ARM.
Jeffrey Yasskin [Wed, 28 Oct 2009 00:28:31 +0000 (00:28 +0000)]
Fix the ModuleDeletion test on PPC and ARM.

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

15 years agorename indbr -> indirectbr to appease the residents of #llvm.
Chris Lattner [Wed, 28 Oct 2009 00:19:10 +0000 (00:19 +0000)]
rename indbr -> indirectbr to appease the residents of #llvm.

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

15 years agoIR support for the new BlockAddress constant kind. This is
Chris Lattner [Wed, 28 Oct 2009 00:01:44 +0000 (00:01 +0000)]
IR support for the new BlockAddress constant kind.  This is
untested and there is no way to use it, next up: doing battle
with asmparser.

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

15 years agoRecord CodeGen optimization level in the BranchFolding pass so that we can
Bob Wilson [Tue, 27 Oct 2009 23:49:38 +0000 (23:49 +0000)]
Record CodeGen optimization level in the BranchFolding pass so that we can
use it to control tail merging when there is a tradeoff between performance
and code size.  When there is only 1 instruction in the common tail, we have
been merging.  That can be good for code size but is a definite loss for
performance.  Now we will avoid tail merging in that case when the
optimization level is "Aggressive", i.e., "-O3".  Radar 7338114.

Since the IfConversion pass invokes BranchFolding, it too needs to know
the optimization level.  Note that I removed the RegisterPass instantiation
for IfConversion because it required a default constructor.  If someone
wants to keep that for some reason, we can add a default constructor with
a hard-wired optimization level.

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

15 years agoRename lib/VMCore/ConstantsContext.h:ValueMap<> to ConstantUniqueMap<> to avoid
Jeffrey Yasskin [Tue, 27 Oct 2009 23:45:55 +0000 (23:45 +0000)]
Rename lib/VMCore/ConstantsContext.h:ValueMap<> to ConstantUniqueMap<> to avoid
colliding with llvm/ADT/ValueMap.h:ValueMap<>.

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

15 years agoAdd new note.
Bill Wendling [Tue, 27 Oct 2009 23:30:07 +0000 (23:30 +0000)]
Add new note.

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

15 years agoFixed a bug in the coalescer where intervals were occasionally merged despite a real...
Lang Hames [Tue, 27 Oct 2009 23:16:58 +0000 (23:16 +0000)]
Fixed a bug in the coalescer where intervals were occasionally merged despite a real interference. This fixes rdar://problem/7157961.

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

15 years agoEnable virtual register based frame index scavenging by default for ARM & T2.
Jim Grosbach [Tue, 27 Oct 2009 22:52:29 +0000 (22:52 +0000)]
Enable virtual register based frame index scavenging by default for ARM & T2.

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

15 years agoMove and clarify note.
Bill Wendling [Tue, 27 Oct 2009 22:48:31 +0000 (22:48 +0000)]
Move and clarify note.

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

15 years agoInfrastructure for dynamic stack realignment on ARM. For now, this is off by
Jim Grosbach [Tue, 27 Oct 2009 22:45:39 +0000 (22:45 +0000)]
Infrastructure for dynamic stack realignment on ARM. For now, this is off by
default behind a command line option. This will enable better performance for
vectors on NEON enabled processors.

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

15 years agoNote corrected.
Bill Wendling [Tue, 27 Oct 2009 22:43:24 +0000 (22:43 +0000)]
Note corrected.

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

15 years agoModify note.
Bill Wendling [Tue, 27 Oct 2009 22:40:45 +0000 (22:40 +0000)]
Modify note.

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

15 years agoRevert the API changes from r85295 to make it easier for people to build
Jeffrey Yasskin [Tue, 27 Oct 2009 22:39:42 +0000 (22:39 +0000)]
Revert the API changes from r85295 to make it easier for people to build
against both 2.6 and HEAD.  The default is still changed to eager jitting.

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

15 years agoAdd a note.
Bill Wendling [Tue, 27 Oct 2009 22:34:43 +0000 (22:34 +0000)]
Add a note.

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

15 years agoFactor out redundancy from clone() implementations.
Devang Patel [Tue, 27 Oct 2009 22:16:29 +0000 (22:16 +0000)]
Factor out redundancy from clone() implementations.

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

15 years agoUpdate the MachineBasicBlock CFG for an indirect branch.
Dan Gohman [Tue, 27 Oct 2009 22:10:34 +0000 (22:10 +0000)]
Update the MachineBasicBlock CFG for an indirect branch.

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

15 years agoAdd CodeGen support for indirect branches.
Dan Gohman [Tue, 27 Oct 2009 21:56:26 +0000 (21:56 +0000)]
Add CodeGen support for indirect branches.

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

15 years agotypo
Chris Lattner [Tue, 27 Oct 2009 21:52:54 +0000 (21:52 +0000)]
typo

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

15 years agoyou can't take the address of the entry block of a function.
Chris Lattner [Tue, 27 Oct 2009 21:49:40 +0000 (21:49 +0000)]
you can't take the address of the entry block of a function.

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

15 years agoimprovements from gabor.
Chris Lattner [Tue, 27 Oct 2009 21:44:20 +0000 (21:44 +0000)]
improvements from gabor.

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

15 years agomake the build build.
Chris Lattner [Tue, 27 Oct 2009 21:43:39 +0000 (21:43 +0000)]
make the build build.

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

15 years agoAdd new APFloat methods that return sign, exp, and mantissa of ieee float and double...
Evan Cheng [Tue, 27 Oct 2009 21:35:42 +0000 (21:35 +0000)]
Add new APFloat methods that return sign, exp, and mantissa of ieee float and double values.

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

15 years agoRandom updates to passes for indbr, I need blockaddress before I can do much more.
Chris Lattner [Tue, 27 Oct 2009 21:27:42 +0000 (21:27 +0000)]
Random updates to passes for indbr, I need blockaddress before I can do much more.

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

15 years agocppbackend support for indbr
Chris Lattner [Tue, 27 Oct 2009 21:24:48 +0000 (21:24 +0000)]
cppbackend support for indbr

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

15 years agoCBE support for indbr.
Chris Lattner [Tue, 27 Oct 2009 21:21:06 +0000 (21:21 +0000)]
CBE support for indbr.

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

15 years agofix things pointed out by Dan!
Chris Lattner [Tue, 27 Oct 2009 21:19:13 +0000 (21:19 +0000)]
fix things pointed out by Dan!

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

15 years agodocument the forthcoming blockaddress constant.
Chris Lattner [Tue, 27 Oct 2009 21:01:34 +0000 (21:01 +0000)]
document the forthcoming blockaddress constant.

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

15 years agoSimilar to r85280, do not clear the "S" bit for RSBri and RSBrs.
Johnny Chen [Tue, 27 Oct 2009 20:51:49 +0000 (20:51 +0000)]
Similar to r85280, do not clear the "S" bit for RSBri and RSBrs.

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

15 years agoDo not held on to DenseMap slot accross map insertion. The insertion may cause the...
Devang Patel [Tue, 27 Oct 2009 20:47:17 +0000 (20:47 +0000)]
Do not held on to DenseMap slot accross map insertion. The insertion may cause the map to grow rending the slot invalid.
Use this opportunity to use ValueMap instead of DenseMap.

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

15 years agoSet condition code bits of BL and BLr9 to 0b1110 (ALways) to distinguish between
Johnny Chen [Tue, 27 Oct 2009 20:45:15 +0000 (20:45 +0000)]
Set condition code bits of BL and BLr9 to 0b1110 (ALways) to distinguish between
BL_pred and BLr9_pred.

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

15 years agodon't use stdio
Chris Lattner [Tue, 27 Oct 2009 20:42:54 +0000 (20:42 +0000)]
don't use stdio

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

15 years agoChange the JIT to compile eagerly by default as agreed in
Jeffrey Yasskin [Tue, 27 Oct 2009 20:30:28 +0000 (20:30 +0000)]
Change the JIT to compile eagerly by default as agreed in
http://llvm.org/PR5184, and beef up the comments to describe what both options
do and the risks of lazy compilation in the presence of threads.

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

15 years agofix pasto pointed out by Rafael
Chris Lattner [Tue, 27 Oct 2009 20:27:24 +0000 (20:27 +0000)]
fix pasto pointed out by Rafael

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