oota-llvm.git
14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 years agoAdd radar number.
Dale Johannesen [Tue, 27 Oct 2009 20:12:38 +0000 (20:12 +0000)]
Add radar number.

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

14 years agoTestcase for llvm-gcc patch 85284.
Dale Johannesen [Tue, 27 Oct 2009 20:06:05 +0000 (20:06 +0000)]
Testcase for llvm-gcc patch 85284.

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

14 years agoRename MallocFreeHelper as MemoryBuiltins
Victor Hernandez [Tue, 27 Oct 2009 20:05:49 +0000 (20:05 +0000)]
Rename MallocFreeHelper as MemoryBuiltins

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

14 years agoCMake: Install .inc files too.
Oscar Fuentes [Tue, 27 Oct 2009 20:04:22 +0000 (20:04 +0000)]
CMake: Install .inc files too.

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

14 years agoRather than excluding quite some things, and still installing
Oscar Fuentes [Tue, 27 Oct 2009 19:57:29 +0000 (19:57 +0000)]
Rather than excluding quite some things, and still installing
CMakeLists.txt, Makefiles, ... it's better to whitelist what we really
want to install.

Patch by Ingmar Vanhassel!

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

14 years agoDo away with addLegalFPImmediate. Add a target hook isFPImmLegal which returns true...
Evan Cheng [Tue, 27 Oct 2009 19:56:55 +0000 (19:56 +0000)]
Do away with addLegalFPImmediate. Add a target hook isFPImmLegal which returns true if the fp immediate can be natively codegened by target.

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

14 years agoDo not clear the "S" bit for RSCri and RSCrs. They inherit from the "sI"
Bob Wilson [Tue, 27 Oct 2009 19:52:03 +0000 (19:52 +0000)]
Do not clear the "S" bit for RSCri and RSCrs.  They inherit from the "sI"
instruction format that already takes care of setting this.

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

14 years agoadd enough support for indirect branch for the feature test to pass
Chris Lattner [Tue, 27 Oct 2009 19:13:16 +0000 (19:13 +0000)]
add enough support for indirect branch for the feature test to pass
(assembler,asmprinter, bc reader+writer) and document it.  Codegen
currently aborts on it.

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

14 years agoExplicitly specify 0b00, i.e, zero rotation, as the rotate filed (Inst{11-10})
Johnny Chen [Tue, 27 Oct 2009 18:44:24 +0000 (18:44 +0000)]
Explicitly specify 0b00, i.e, zero rotation, as the rotate filed (Inst{11-10})
for the r/rr fragment of the multiclass AI_unary_rrot/AI_bin_rrot.

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

14 years agoAdd missing testcase.
Rafael Espindola [Tue, 27 Oct 2009 17:59:03 +0000 (17:59 +0000)]
Add missing testcase.

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

14 years agochange of mind :)
Chris Lattner [Tue, 27 Oct 2009 17:40:49 +0000 (17:40 +0000)]
change of mind :)

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

14 years agoRemove unnecessary gotos to fall-thru successors.
Sanjiv Gupta [Tue, 27 Oct 2009 17:40:24 +0000 (17:40 +0000)]
Remove unnecessary gotos to fall-thru successors.

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

14 years agorename test.
Chris Lattner [Tue, 27 Oct 2009 17:40:19 +0000 (17:40 +0000)]
rename test.

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

14 years agoTest commit. Added '.' to the comment line.
Johnny Chen [Tue, 27 Oct 2009 17:25:15 +0000 (17:25 +0000)]
Test commit.  Added '.' to the comment line.

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

14 years agoType.h doesn't need to #include LLVMContext.h
Chris Lattner [Tue, 27 Oct 2009 17:08:31 +0000 (17:08 +0000)]
Type.h doesn't need to #include LLVMContext.h

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

14 years agopseudosourcevalue is also still using getGlobalContext(), so it isn't
Chris Lattner [Tue, 27 Oct 2009 17:02:08 +0000 (17:02 +0000)]
pseudosourcevalue is also still using getGlobalContext(), so it isn't
thread safe either.

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

14 years agoapparently the X86 JIT isn't fully contextized, it is still using getGlobalContext...
Chris Lattner [Tue, 27 Oct 2009 17:01:03 +0000 (17:01 +0000)]
apparently the X86 JIT isn't fully contextized, it is still using getGlobalContext() :(

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

14 years agoFix reversed logic spotted by Owen Anderson.
Nick Lewycky [Tue, 27 Oct 2009 16:56:58 +0000 (16:56 +0000)]
Fix reversed logic spotted by Owen Anderson.

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

14 years agotrim another #include
Chris Lattner [Tue, 27 Oct 2009 16:53:54 +0000 (16:53 +0000)]
trim another #include

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

14 years agoremove an unneeded #include.
Chris Lattner [Tue, 27 Oct 2009 16:49:53 +0000 (16:49 +0000)]
remove an unneeded #include.

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

14 years agoConvert Analysis tests to FileCheck in regards to PR5307.
Edward O'Callaghan [Tue, 27 Oct 2009 14:54:46 +0000 (14:54 +0000)]
Convert Analysis tests to FileCheck in regards to PR5307.

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

14 years agoCorrectly align double arguments in the stack.
Rafael Espindola [Tue, 27 Oct 2009 14:09:44 +0000 (14:09 +0000)]
Correctly align double arguments in the stack.

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

14 years ago80-col violation.
Mikhail Glushenkov [Tue, 27 Oct 2009 09:02:49 +0000 (09:02 +0000)]
80-col violation.

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

14 years agoFix Thumb2 failures by converting them to FileCheck.
Bob Wilson [Tue, 27 Oct 2009 06:31:02 +0000 (06:31 +0000)]
Fix Thumb2 failures by converting them to FileCheck.

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

14 years agoFix the rest of the ARM failures by converting them to FileCheck.
Bob Wilson [Tue, 27 Oct 2009 06:16:45 +0000 (06:16 +0000)]
Fix the rest of the ARM failures by converting them to FileCheck.

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

14 years agoFix some more failures by converting to FileCheck.
Bob Wilson [Tue, 27 Oct 2009 05:50:28 +0000 (05:50 +0000)]
Fix some more failures by converting to FileCheck.

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

14 years agoFix a pretty serious misfeature of the inliner: if it inlines a function
Chris Lattner [Tue, 27 Oct 2009 05:39:41 +0000 (05:39 +0000)]
Fix a pretty serious misfeature of the inliner: if it inlines a function
with multiple return values it inserts a PHI to merge them all together.
However, if the return values are all the same, it ends up with a pointless
PHI and this pointless PHI happens to really block SRoA from happening in
at least a silly C++ example written by Doug, but probably others.  This
fixes rdar://7339069.

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

14 years agoconvert to filecheck.
Chris Lattner [Tue, 27 Oct 2009 05:35:35 +0000 (05:35 +0000)]
convert to filecheck.

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

14 years agoConvert to FileCheck, fixing failure due to tab change in the process.
Bob Wilson [Tue, 27 Oct 2009 05:30:47 +0000 (05:30 +0000)]
Convert to FileCheck, fixing failure due to tab change in the process.

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

14 years agolang points out that the comment is out of date with the code.
Chris Lattner [Tue, 27 Oct 2009 04:58:10 +0000 (04:58 +0000)]
lang points out that the comment is out of date with the code.

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

14 years agoFix VS build, patch by Marius Wachtler.
Mike Stump [Tue, 27 Oct 2009 02:17:51 +0000 (02:17 +0000)]
Fix VS build, patch by Marius Wachtler.

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

14 years agoVS build fix, patch by Marius Wachtler.
Mike Stump [Tue, 27 Oct 2009 02:14:13 +0000 (02:14 +0000)]
VS build fix, patch by Marius Wachtler.

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

14 years agoFix OProfileJITEventListener after r85182.
Jeffrey Yasskin [Tue, 27 Oct 2009 01:06:51 +0000 (01:06 +0000)]
Fix OProfileJITEventListener after r85182.

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

14 years agoAdd objectsize intrinsic and hook it up through codegen. Doesn't
Eric Christopher [Tue, 27 Oct 2009 00:52:25 +0000 (00:52 +0000)]
Add objectsize intrinsic and hook it up through codegen. Doesn't
do anything than return "I don't know" at the moment.

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

14 years agoNow VFP instructions.
Evan Cheng [Tue, 27 Oct 2009 00:20:49 +0000 (00:20 +0000)]
Now VFP instructions.

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

14 years agoAdd braces to avoid ambiguous else.
Dan Gohman [Tue, 27 Oct 2009 00:11:02 +0000 (00:11 +0000)]
Add braces to avoid ambiguous else.

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

14 years agoChange Thumb1 and Thumb2 instructions to separate opcode from operands with a tab...
Evan Cheng [Tue, 27 Oct 2009 00:08:59 +0000 (00:08 +0000)]
Change Thumb1 and Thumb2 instructions to separate opcode from operands with a tab instead of a space.

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

14 years agoAutomatically do the equivalent of freeMachineCodeForFunction(F) when F is
Jeffrey Yasskin [Tue, 27 Oct 2009 00:03:05 +0000 (00:03 +0000)]
Automatically do the equivalent of freeMachineCodeForFunction(F) when F is
being destroyed. This allows users to run global optimizations like globaldce
even after some functions have been jitted.

This patch also removes the Function* parameter to
JITEventListener::NotifyFreeingMachineCode() since it can cause that to be
called when the Function is partially destroyed. This change will be even more
helpful later when I think we'll want to allow machine code to actually outlive
its Function.

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

14 years agoRename MallocHelper as MallocFreeHelper, since it now also identifies calls to free()
Victor Hernandez [Mon, 26 Oct 2009 23:58:56 +0000 (23:58 +0000)]
Rename MallocHelper as MallocFreeHelper, since it now also identifies calls to free()

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

14 years agoForgot to commit these.
Owen Anderson [Mon, 26 Oct 2009 23:56:52 +0000 (23:56 +0000)]
Forgot to commit these.

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

14 years agoAdd a straight-forward implementation of SCCVN for aggressively eliminating scalar...
Owen Anderson [Mon, 26 Oct 2009 23:55:47 +0000 (23:55 +0000)]
Add a straight-forward implementation of SCCVN for aggressively eliminating scalar redundancies.

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

14 years agoChange ARM asm strings to separate opcode from operands with a tab instead of a space.
Evan Cheng [Mon, 26 Oct 2009 23:45:59 +0000 (23:45 +0000)]
Change ARM asm strings to separate opcode from operands with a tab instead of a space.

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

14 years agoRemove all references to MallocInst and FreeInst
Victor Hernandez [Mon, 26 Oct 2009 23:44:29 +0000 (23:44 +0000)]
Remove all references to MallocInst and FreeInst

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