12 years agoMove the number of cpus logic to somewhere more logical.
Duncan Sands [Wed, 8 Sep 2010 19:50:25 +0000 (19:50 +0000)]
Move the number of cpus logic to somewhere more logical.

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

12 years agoRemove ssp from this test.
Eric Christopher [Wed, 8 Sep 2010 19:32:34 +0000 (19:32 +0000)]
Remove ssp from this test.

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

12 years agoAdd intrinsic forms of mmx<->sse conversions. Notes:
Dale Johannesen [Wed, 8 Sep 2010 19:15:38 +0000 (19:15 +0000)]
Add intrinsic forms of mmx<->sse conversions.  Notes:
Omission of memory form of PI2PD is intentional; this
does not use an MMX register and does not put the chip
into MMX mode (PI2PS, oddly enough, does).
Operands of PI2PS follow the gcc builtin, not Intel.

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

12 years agoRewrite TargetMaterializeConstant.
Eric Christopher [Wed, 8 Sep 2010 18:56:34 +0000 (18:56 +0000)]
Rewrite TargetMaterializeConstant.

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

12 years agoRemove dead code.
Jakob Stoklund Olesen [Wed, 8 Sep 2010 18:50:24 +0000 (18:50 +0000)]
Remove dead code.

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

12 years agoMove private member functions to the end of the class declaration.
Owen Anderson [Wed, 8 Sep 2010 18:41:07 +0000 (18:41 +0000)]
Move private member functions to the end of the class declaration.

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

12 years agoA script that tests a certain release candidate in several modes. It does a
Bill Wendling [Wed, 8 Sep 2010 18:32:31 +0000 (18:32 +0000)]
A script that tests a certain release candidate in several modes. It does a
2-phase build of llvm and llvm-gcc, similar to what the buildbots do, and runs
the regression testsuite.

Things to do:

- Work out some bugs with llvm-gcc flags.
- Not all platforms support ObjC.
- Run the test-suite.

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

12 years agoAdd a directory for release management scripts.
Bill Wendling [Wed, 8 Sep 2010 18:30:06 +0000 (18:30 +0000)]
Add a directory for release management scripts.

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

12 years agoMake module ownership methods on LLVMContext private, and make Module a friend
Owen Anderson [Wed, 8 Sep 2010 18:22:11 +0000 (18:22 +0000)]
Make module ownership methods on LLVMContext private, and make Module a friend
so that it can access them.  These are not intended to be externally accessible APIs.

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

12 years agoMinor change. Fix comments and remove unused and redundant code
Bruno Cardoso Lopes [Wed, 8 Sep 2010 18:12:31 +0000 (18:12 +0000)]
Minor change. Fix comments and remove unused and redundant code

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

12 years agoELF_STB_Local is 0 so setting and checking it must be done specially
Roman Divacky [Wed, 8 Sep 2010 18:08:40 +0000 (18:08 +0000)]
ELF_STB_Local is 0 so setting and checking it must be done specially

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

12 years agoClarify the ownership model of LLVMContext and Module. Namely, contexts own
Owen Anderson [Wed, 8 Sep 2010 18:03:32 +0000 (18:03 +0000)]
Clarify the ownership model of LLVMContext and Module. Namely, contexts own
modules are instantiated in them.  If the context is deleted, all of its owned
modules are also deleted.

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

12 years agox86 vector shuffle lowering now relies only on target specific
Bruno Cardoso Lopes [Wed, 8 Sep 2010 17:43:25 +0000 (17:43 +0000)]
x86 vector shuffle lowering now relies only on target specific
nodes to emit shuffles and don't do isel mask matching anymore.
- Add the selection of the remaining shuffle opcode (movddup)
- Introduce two new functions to "recognize" where we may get
potential folds and add several comments to them explaining why
they are not yet in the desidered shape.
- Add more patterns to fallback the case where we select
a specific shuffle opcode as if it could fold a load, but it
can't, so remap to a valid instruction.
- Add a couple of FIXMEs to address in the following days once
there's a good solution to the current folding problem.

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

12 years agoBe more careful about when to do dynamic stack realignment. Since we have an
Jim Grosbach [Wed, 8 Sep 2010 17:22:12 +0000 (17:22 +0000)]
Be more careful about when to do dynamic stack realignment. Since we have an
option to disable base pointer usage, pay attention to it when deciding
if we can realign (if no base pointer and VLAs, we can't).

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

12 years agoAdd missing assert
Jim Grosbach [Wed, 8 Sep 2010 17:05:45 +0000 (17:05 +0000)]
Add missing assert

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

12 years agoExecute all Pass Printers even if -quiet is set.
Tobias Grosser [Wed, 8 Sep 2010 15:02:51 +0000 (15:02 +0000)]
Execute all Pass Printers even if -quiet is set.

Follow the same logic in the LoopPass, ModulePass and CallGraphSCCPass printers,
as it was already used in the BasicBlockPass and FunctionPass printers. This is
more consistent.

The other option would have been to completely disable dumping the analysis
information. However, as this information is the only information printed if the
-analysis flag is set, calling opt would not do anything at all.

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

12 years agoInclude original pass name in the PassPrinter's name.
Tobias Grosser [Wed, 8 Sep 2010 15:02:47 +0000 (15:02 +0000)]
Include original pass name in the PassPrinter's name.

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

12 years agoUnresolved weak symbols have value equal zero.
Roman Divacky [Wed, 8 Sep 2010 14:29:45 +0000 (14:29 +0000)]
Unresolved weak symbols have value equal zero.

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

12 years agoFix CellSPU vector shuffles, again.
Kalle Raiskila [Wed, 8 Sep 2010 11:53:38 +0000 (11:53 +0000)]
Fix CellSPU vector shuffles, again.
Some cases of lowering to rotate were miscompiled.

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

12 years agoadd support for the commuted form of the test instruction, rdar://8018260.
Chris Lattner [Wed, 8 Sep 2010 05:51:12 +0000 (05:51 +0000)]
add support for the commuted form of the test instruction, rdar://8018260.

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

12 years agoimplement proper support for sysret{,l,q}, rdar://8403907
Chris Lattner [Wed, 8 Sep 2010 05:45:34 +0000 (05:45 +0000)]
implement proper support for sysret{,l,q}, rdar://8403907

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

12 years agoimplement the iret suite of instructions properly,
Chris Lattner [Wed, 8 Sep 2010 05:38:31 +0000 (05:38 +0000)]
implement the iret suite of instructions properly,
fixing rdar://8403974

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

12 years agoadd support for instruction prefixes on the same line as the instruction,
Chris Lattner [Wed, 8 Sep 2010 05:17:37 +0000 (05:17 +0000)]
add support for instruction prefixes on the same line as the instruction,
implementing rdar://8033482 and PR7254.

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

12 years agochange the MC "ParseInstruction" interface to make it the
Chris Lattner [Wed, 8 Sep 2010 05:10:46 +0000 (05:10 +0000)]
change the MC "ParseInstruction" interface to make it the
implementation's job to check for and lex the EndOfStatement

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

12 years agogas accepts xchg <mem>, <reg> as a synonym for xchg <reg>, <mem>.
Chris Lattner [Wed, 8 Sep 2010 04:53:27 +0000 (04:53 +0000)]
gas accepts xchg <mem>, <reg> as a synonym for xchg <reg>, <mem>.
Add this to the mc assembler, fixing PR8061

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

12 years agoARM/Disassembler: Fix definitions incompatible(unsigned and uint32_t) to Cygwin-1...
NAKAMURA Takumi [Wed, 8 Sep 2010 04:48:17 +0000 (04:48 +0000)]
ARM/Disassembler: Fix definitions incompatible(unsigned and uint32_t) to Cygwin-1.5, following up to r113255.

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

12 years agofix the encoding of the "jump on *cx" family of instructions,
Chris Lattner [Wed, 8 Sep 2010 04:30:51 +0000 (04:30 +0000)]
fix the encoding of the "jump on *cx" family of instructions,

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

12 years agoremove trailing whitespace
Jim Grosbach [Wed, 8 Sep 2010 03:54:02 +0000 (03:54 +0000)]
remove trailing whitespace

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

12 years agoremove obsolete comment
Jim Grosbach [Wed, 8 Sep 2010 03:51:44 +0000 (03:51 +0000)]
remove obsolete comment

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

12 years agodisable for the moment while tracking down a few Thumb2-O0 failure that look
Jim Grosbach [Wed, 8 Sep 2010 02:00:34 +0000 (02:00 +0000)]
disable for the moment while tracking down a few Thumb2-O0 failure that look
related. (attempt deux, complete w/ test update this time)

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

12 years agowoops. need to update a test along with this.
Jim Grosbach [Wed, 8 Sep 2010 01:49:09 +0000 (01:49 +0000)]
woops. need to update a test along with this.

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

12 years agodisable temporarily while sorting out a few test failures in Thumb2-O0 tests.
Jim Grosbach [Wed, 8 Sep 2010 01:47:49 +0000 (01:47 +0000)]
disable temporarily while sorting out a few test failures in Thumb2-O0 tests.

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

12 years agoAdd a new experimental generalized dependence query interface to
Dan Gohman [Wed, 8 Sep 2010 01:32:20 +0000 (01:32 +0000)]
Add a new experimental generalized dependence query interface to
AliasAnalysis, and some code for implementing the new query on top of
existing implementations by making standard alias and getModRefInfo

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

12 years agocorrect spill code to properly determine if dynamic stack realignment is
Jim Grosbach [Wed, 8 Sep 2010 00:26:59 +0000 (00:26 +0000)]
correct spill code to properly determine if dynamic stack realignment is
present in the function and thus whether aligned load/store instructions can
be used.

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

12 years agoVFP/NEON load/store multiple instructions are addrmode4, not 5.
Jim Grosbach [Wed, 8 Sep 2010 00:25:50 +0000 (00:25 +0000)]
VFP/NEON load/store multiple instructions are addrmode4, not 5.

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

12 years agoAdd a separate unrolling threshold when the current function is being optimized for...
Owen Anderson [Tue, 7 Sep 2010 23:15:30 +0000 (23:15 +0000)]
Add a separate unrolling threshold when the current function is being optimized for size.
The threshold value of 50 is arbitrary, and I chose it simply by analogy to the inlining thresholds, where
the baseline unrolling threshold is slightly smaller than the baseline inlining threshold.  This could
undoubtedly use some tuning.

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

12 years agoAdd documentation for llvm-diff.
John McCall [Tue, 7 Sep 2010 23:10:21 +0000 (23:10 +0000)]
Add documentation for llvm-diff.

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

12 years agoDon't add <imp-def> operands during register rewriting.
Jakob Stoklund Olesen [Tue, 7 Sep 2010 22:38:45 +0000 (22:38 +0000)]
Don't add <imp-def> operands during register rewriting.

LiveIntervals already adds <imp-def> operands for super-registers when a subreg
def defines the whole register. Thus, it is not necessary to do it again when

In fact, the super-register imp-defs caused miscompilations because the late
scheduler couldn't see that the super-register was read.

We still add super-reg <imp-use,kill> operands when rewriting virtuals to

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

12 years agoTo shrink a t2LDM instruction to the 16-bit wide tLDM instruction, the base
Jim Grosbach [Tue, 7 Sep 2010 22:30:53 +0000 (22:30 +0000)]
To shrink a t2LDM instruction to the 16-bit wide tLDM instruction, the base
register must be one of the destination registers for the load. Otherwise,
the tLDM instruction will write-back to the base register, which isn't what's
desired (otherwise, we'd have a t2LDM_UPD instead).


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

12 years agoremove these tests for now.
Devang Patel [Tue, 7 Sep 2010 22:03:44 +0000 (22:03 +0000)]
remove these tests for now.

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

12 years agogrammar tweak
Jim Grosbach [Tue, 7 Sep 2010 21:30:25 +0000 (21:30 +0000)]
grammar tweak

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

12 years agoRemove untrue comments.
Bill Wendling [Tue, 7 Sep 2010 21:07:59 +0000 (21:07 +0000)]
Remove untrue comments.

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

12 years agoFactor out some x86 vector shuffle rewriting and add comments about the direction...
Bruno Cardoso Lopes [Tue, 7 Sep 2010 21:03:14 +0000 (21:03 +0000)]
Factor out some x86 vector shuffle rewriting and add comments about the direction the shuffle lowering is heading to

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

12 years agoThere is no need to force target if the test is going to run on other x86 platforms.
Devang Patel [Tue, 7 Sep 2010 20:59:09 +0000 (20:59 +0000)]
There is no need to force target if the test is going to run on other x86 platforms.

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

12 years agoRemove dead code. ManagedCleanup is unused, and contained a serious bug in that
Owen Anderson [Tue, 7 Sep 2010 20:53:39 +0000 (20:53 +0000)]
Remove dead code.  ManagedCleanup is unused, and contained a serious bug in that
the provided cleanup function is never actually called.

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

12 years agoFix PR7972, in which the PassRegistry was being leaked. As part of this,
Owen Anderson [Tue, 7 Sep 2010 20:48:10 +0000 (20:48 +0000)]
Fix PR7972, in which the PassRegistry was being leaked.  As part of this,
switch to using a ManagedStatic for the global PassRegistry instead of a
ManagedCleanup, and fix a destruction ordering bug this exposed.

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

12 years agoTypo. Thanks to BillW for pointing it out!
Stuart Hastings [Tue, 7 Sep 2010 20:39:07 +0000 (20:39 +0000)]
Typo.  Thanks to BillW for pointing it out!

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

12 years agoTidy up the getModRefInfo declarations.
Dan Gohman [Tue, 7 Sep 2010 20:37:47 +0000 (20:37 +0000)]
Tidy up the getModRefInfo declarations.

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

12 years agoMove code around to prepare for moving some of the logic together to another function
Bruno Cardoso Lopes [Tue, 7 Sep 2010 20:20:27 +0000 (20:20 +0000)]
Move code around to prepare for moving some of the logic together to another function

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

12 years agoProperly initialize the pImpl member of PassRegistry to zero.
Owen Anderson [Tue, 7 Sep 2010 20:13:48 +0000 (20:13 +0000)]
Properly initialize the pImpl member of PassRegistry to zero.

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

12 years agoAdd doxygen comments for PassRegistry.
Owen Anderson [Tue, 7 Sep 2010 20:04:26 +0000 (20:04 +0000)]
Add doxygen comments for PassRegistry.

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

12 years agoAdd an MVT::x86mmx type. It will take the place of all current MMX vector types.
Bill Wendling [Tue, 7 Sep 2010 20:03:56 +0000 (20:03 +0000)]
Add an MVT::x86mmx type. It will take the place of all current MMX vector types.

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

12 years agoFix a serious performance regression introduced by r108687 on linux:
Chris Lattner [Tue, 7 Sep 2010 20:01:38 +0000 (20:01 +0000)]
Fix a serious performance regression introduced by r108687 on linux:
turning (fptrunc (sqrt (fpext x))) -> (sqrtf x)  is great, but we have
to delete the original sqrt as well.  Not doing so causes us to do
two sqrt's when building with -fmath-errno (the default on linux).

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

12 years agoRemove a dead comment.
Evan Cheng [Tue, 7 Sep 2010 20:01:10 +0000 (20:01 +0000)]
Remove a dead comment.

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

12 years agorename test.
Chris Lattner [Tue, 7 Sep 2010 19:57:06 +0000 (19:57 +0000)]
rename test.

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

12 years agohopefully fix a problem building on cygwin-1.5
Chris Lattner [Tue, 7 Sep 2010 19:50:53 +0000 (19:50 +0000)]
hopefully fix a problem building on cygwin-1.5

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

12 years agoClean up some of the PassRegistry implementation, and pImpl-ize it to reduce #include...
Owen Anderson [Tue, 7 Sep 2010 19:16:25 +0000 (19:16 +0000)]
Clean up some of the PassRegistry implementation, and pImpl-ize it to reduce #include clutter
and exposing internal details.

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

12 years agoFix whitespace, because I'm OCD.
Bill Wendling [Tue, 7 Sep 2010 18:49:14 +0000 (18:49 +0000)]
Fix whitespace, because I'm OCD.

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

12 years agoTest case for r113248. Raar 8361341.
Stuart Hastings [Tue, 7 Sep 2010 18:43:57 +0000 (18:43 +0000)]
Test case for r113248.  Raar 8361341.

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

12 years agodecouple MMX check from regular splat checks. Some refactoring is coming, and MMX...
Bruno Cardoso Lopes [Tue, 7 Sep 2010 18:41:45 +0000 (18:41 +0000)]
decouple MMX check from regular splat checks. Some refactoring is coming, and MMX should be left alone to be easily removed after moving to intrinsics

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

12 years agoRemove now useless check, because the code can be matched below, no need to leave...
Bruno Cardoso Lopes [Tue, 7 Sep 2010 18:29:03 +0000 (18:29 +0000)]
Remove now useless check, because the code can be matched below, no need to leave it for isel

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

12 years agoIssue a #error if the host doesn't have an implementation for
Dan Gohman [Tue, 7 Sep 2010 18:26:49 +0000 (18:26 +0000)]
Issue a #error if the host doesn't have an implementation for
GetMainExecutable yet.

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

12 years agoMinor change. Since the checks are equivalent, use isMMX
Bruno Cardoso Lopes [Tue, 7 Sep 2010 18:24:00 +0000 (18:24 +0000)]
Minor change. Since the checks are equivalent, use isMMX

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

12 years agoFix command line used to link these test cases.
Devang Patel [Tue, 7 Sep 2010 18:17:56 +0000 (18:17 +0000)]
Fix command line used to link these test cases.

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

12 years agoUpdate configure for change to autoconf/configure.ac to add PTX backend.
Nick Lewycky [Tue, 7 Sep 2010 18:14:42 +0000 (18:14 +0000)]
Update configure for change to autoconf/configure.ac to add PTX backend.

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

12 years agoCreate PTX backend. Patch by Che-Liang Chiou!
Nick Lewycky [Tue, 7 Sep 2010 18:14:24 +0000 (18:14 +0000)]
Create PTX backend. Patch by Che-Liang Chiou!

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

12 years agoAdd patterns for MMX that use the new intrinsics.
Dale Johannesen [Tue, 7 Sep 2010 18:10:56 +0000 (18:10 +0000)]
Add patterns for MMX that use the new intrinsics.
Enable palignr intrinsic.
These may need adjustment for a new VT in due course.

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

12 years agoReintroduce dbg-declare tests.
Devang Patel [Tue, 7 Sep 2010 18:01:49 +0000 (18:01 +0000)]
Reintroduce dbg-declare tests.

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

12 years agoRemove unused target specific node
Bruno Cardoso Lopes [Tue, 7 Sep 2010 17:38:55 +0000 (17:38 +0000)]
Remove unused target specific node

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

12 years agoRemove last three tests. I need to make them independent of my setup.
Devang Patel [Tue, 7 Sep 2010 17:08:57 +0000 (17:08 +0000)]
Remove last three tests. I need to make them independent of my setup.

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

12 years agoAdd a test case to check handling of dbg-declare during hybrid mode where we begin...
Devang Patel [Tue, 7 Sep 2010 17:03:44 +0000 (17:03 +0000)]
Add a test case to check handling of dbg-declare  during hybrid mode where we begin using fast-isel but switch back to DAG building at some point.

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

12 years agoAdd a test case to check handling of dbg-declare by selection DAG builder.
Devang Patel [Tue, 7 Sep 2010 16:56:35 +0000 (16:56 +0000)]
Add a test case to check handling of dbg-declare by selection DAG builder.

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

12 years agoAdd a test case to check handling of dbg-declare by fast-isel.
Devang Patel [Tue, 7 Sep 2010 16:40:53 +0000 (16:40 +0000)]
Add a test case to check handling of dbg-declare by fast-isel.

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

12 years agoDon't leak the old operand when transforming "sldt" into "sldtw".
Benjamin Kramer [Tue, 7 Sep 2010 14:40:58 +0000 (14:40 +0000)]
Don't leak the old operand when transforming "sldt" into "sldtw".

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

12 years agoattempt to appease msvc
Chris Lattner [Tue, 7 Sep 2010 06:10:48 +0000 (06:10 +0000)]
attempt to appease msvc

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

12 years agofix comment typos
Gabor Greif [Tue, 7 Sep 2010 06:06:06 +0000 (06:06 +0000)]
fix comment typos

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

12 years agoAdd completely hokey binary-and and binary-or operations to ConstantRange and
Nick Lewycky [Tue, 7 Sep 2010 05:39:02 +0000 (05:39 +0000)]
Add completely hokey binary-and and binary-or operations to ConstantRange and
teach LazyValueInfo to use them.

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

12 years agoFix major bug in thunk detection. Also verify the calling convention.
Nick Lewycky [Tue, 7 Sep 2010 01:42:10 +0000 (01:42 +0000)]
Fix major bug in thunk detection. Also verify the calling convention.

Switch from isWeakForLinker to mayBeOverridden which is more accurate.

Add more statistics and debugging info. Add comments. Move static function
outside anonymous namespace.

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

12 years agoadd missing cmov aliases, this resolves rdar://8208499
Chris Lattner [Tue, 7 Sep 2010 00:05:45 +0000 (00:05 +0000)]
add missing cmov aliases, this resolves rdar://8208499

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

12 years agoremove duplicated entry
Chris Lattner [Mon, 6 Sep 2010 23:57:24 +0000 (23:57 +0000)]
remove duplicated entry

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

12 years agoAdd a new isSignWrappedSet() method to ConstantRange.
Nick Lewycky [Mon, 6 Sep 2010 23:52:49 +0000 (23:52 +0000)]
Add a new isSignWrappedSet() method to ConstantRange.

Fix zeroExtend and signExtend to support empty sets, and to return the smallest
possible result set which contains the extension of each element in their
inputs. For example zext i8 [100, 10) to i16 is now [0, 256), not i16 [100, 10)
which contains 63446 members.

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

12 years ago"sldt <mem>" is ambiguous in 64-bit mode, but should
Chris Lattner [Mon, 6 Sep 2010 23:51:44 +0000 (23:51 +0000)]
"sldt <mem>" is ambiguous in 64-bit mode, but should
always be disambiguated as sldtw.  sldtw and sldtq with
a mem operands have the same effect, but sldtw is more
compact.  Force it to sldtw, resolving rdar://8017530

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

12 years agofix rdar://8017621 - llvm-mc can't guess encoding for "push $(1000)"
Chris Lattner [Mon, 6 Sep 2010 23:40:56 +0000 (23:40 +0000)]
fix rdar://8017621 - llvm-mc can't guess encoding for "push $(1000)"

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

12 years agogeneralize my previous operand loc info hack. If the same operand
Chris Lattner [Mon, 6 Sep 2010 23:37:39 +0000 (23:37 +0000)]
generalize my previous operand loc info hack.  If the same operand
is busted for all variants, report it as the location.  This allows
us to get the operand right for bugs like:

t.s:3:12: error: invalid operand for instruction
outb %al, %gs

Even though there are reg/imm and reg/reg forms of this instruction.

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

12 years agofix the operand constraints of the immediate form of in/out,
Chris Lattner [Mon, 6 Sep 2010 23:29:05 +0000 (23:29 +0000)]
fix the operand constraints of the immediate form of in/out,
allowing unsigned 8-bit operands.  This fixes rdar://8208481

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

12 years agoin the case where an instruction only has one implementation
Chris Lattner [Mon, 6 Sep 2010 22:11:18 +0000 (22:11 +0000)]
in the case where an instruction only has one implementation
of a mneumonic, report operand errors with better location
info.  For example, we now report:

t.s:6:14: error: invalid operand for instruction
        cwtl $1

but we fail for common cases like:

t.s:11:4: error: invalid operand for instruction
   addl $1, $1

because we don't know if this is supposed to be the reg/imm or imm/reg

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

12 years agoNow that we know if we had a total fail on the instruction mnemonic,
Chris Lattner [Mon, 6 Sep 2010 21:54:15 +0000 (21:54 +0000)]
Now that we know if we had a total fail on the instruction mnemonic,
give a more detailed error.  Before:

t.s:11:4: error: unrecognized instruction
   addl $1, $1
t.s:12:4: error: unrecognized instruction
   f2efqefa $1


t.s:11:4: error: invalid operand for instruction
   addl $1, $1
t.s:12:4: error: invalid instruction mnemonic 'f2efqefa'
   f2efqefa $1

This fixes rdar://8017912 - llvm-mc says "unrecognized instruction" when it means "invalid operands"

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

12 years agosimplify DEBUG_WITH_TYPE usage
Chris Lattner [Mon, 6 Sep 2010 21:28:52 +0000 (21:28 +0000)]
simplify DEBUG_WITH_TYPE usage

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

12 years agothis if can now be an assert.
Chris Lattner [Mon, 6 Sep 2010 21:25:43 +0000 (21:25 +0000)]
this if can now be an assert.

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

12 years ago;
Chris Lattner [Mon, 6 Sep 2010 21:23:43 +0000 (21:23 +0000)]

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

12 years agonow that the opcode is trivially exposed, start matching instructions
Chris Lattner [Mon, 6 Sep 2010 21:22:45 +0000 (21:22 +0000)]
now that the opcode is trivially exposed, start matching instructions
by doing a binary search over the mnemonic instead of doing a linear
search through all possible instructions.  This implements rdar://7785064

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

12 years agoemit the match table at global scope instead of within the
Chris Lattner [Mon, 6 Sep 2010 21:08:38 +0000 (21:08 +0000)]
emit the match table at global scope instead of within the
MatchInstructionImpl. This makes it easier to read/understand

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

12 years agospecial case the mnemonic operand of the instruction in the
Chris Lattner [Mon, 6 Sep 2010 21:01:37 +0000 (21:01 +0000)]
special case the mnemonic operand of the instruction in the
generated matcher, emiting it as a column in the MatchEntry
table instead of forcing it to go through classification and
everything else.  Making it be classified caused tblgen to
produce a ton of one-off classes for each mneumonic.  This
should reduce the size of the generated matcher significantly
while paving the way for future improvements.

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

12 years agoThe "ambiguous instructions" check only produces anything with -debug,
Chris Lattner [Mon, 6 Sep 2010 20:21:47 +0000 (20:21 +0000)]
The "ambiguous instructions" check only produces anything with -debug,
so only do the N^2 loop with debug mode.

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

12 years agosimplify the hacks around jrcxz.
Chris Lattner [Mon, 6 Sep 2010 20:10:12 +0000 (20:10 +0000)]
simplify the hacks around jrcxz.

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

12 years agohave tblgen detect when an instruction would have matched, but
Chris Lattner [Mon, 6 Sep 2010 20:08:02 +0000 (20:08 +0000)]
have tblgen detect when an instruction would have matched, but
failed because a subtarget feature was not enabled.  Use this to
remove a bunch of hacks from the X86AsmParser for rejecting things
like popfl in 64-bit mode.  Previously these hacks weren't needed,
but were important to get a message better than "invalid instruction"
when used in the wrong mode.

This also fixes bugs where pushal would not be rejected correctly in
32-bit mode (just pusha).

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

12 years agochange MatchInstructionImpl to return an enum instead of bool.
Chris Lattner [Mon, 6 Sep 2010 19:22:17 +0000 (19:22 +0000)]
change MatchInstructionImpl to return an enum instead of bool.

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

12 years agoadd note
Chris Lattner [Mon, 6 Sep 2010 19:14:40 +0000 (19:14 +0000)]
add note

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

12 years agohave AsmMatcherEmitter.cpp produce the hunk of code that gets included
Chris Lattner [Mon, 6 Sep 2010 19:11:01 +0000 (19:11 +0000)]
have AsmMatcherEmitter.cpp produce the hunk of code that gets included
into the middle of the class, and rework how the different sections of
the generated file are conditionally included for simplicity.

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

12 years agoRegenerate.
Eric Christopher [Mon, 6 Sep 2010 18:47:10 +0000 (18:47 +0000)]

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