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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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
form.

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

13 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
   ^

After:

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

13 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

13 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

13 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

13 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

13 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
MatchInstructionImpl.

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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

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

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

13 years agoUpdate to 2.9 post-2.8 branch.
Eric Christopher [Mon, 6 Sep 2010 18:47:00 +0000 (18:47 +0000)]
Update to 2.9 post-2.8 branch.

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

13 years agoRedefine LOOP* instructions from I to Ii8PCRel as they take an i8 argument.
Roman Divacky [Mon, 6 Sep 2010 18:43:14 +0000 (18:43 +0000)]
Redefine LOOP* instructions from I to Ii8PCRel as they take an i8 argument.

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

13 years agorandom cleanups
Chris Lattner [Mon, 6 Sep 2010 18:32:06 +0000 (18:32 +0000)]
random cleanups

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

13 years agoMCELF: Align symtab, relocation sections and section headers properly. Patch by Krist...
Benjamin Kramer [Mon, 6 Sep 2010 16:11:52 +0000 (16:11 +0000)]
MCELF: Align symtab, relocation sections and section headers properly. Patch by Krister Wombell.

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

13 years agocompute the HasSSE3 bit correctly, patch by Nikolai Saoukh.
Chris Lattner [Mon, 6 Sep 2010 05:19:44 +0000 (05:19 +0000)]
compute the HasSSE3 bit correctly, patch by Nikolai Saoukh.

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

13 years agofix PR8067, an over-aggressive assertion in LICM.
Chris Lattner [Mon, 6 Sep 2010 05:11:24 +0000 (05:11 +0000)]
fix PR8067, an over-aggressive assertion in LICM.

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

13 years agoemit the LLVM intrinsic name -> intrinsic number mapping table with
Chris Lattner [Mon, 6 Sep 2010 03:58:45 +0000 (03:58 +0000)]
emit the LLVM intrinsic name -> intrinsic number mapping table with
StringMatcher instead of a linear sequence of memcmps.

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

13 years agocleanup some of the lifetime/invariant marker stuff, add a big fixme.
Chris Lattner [Mon, 6 Sep 2010 03:58:04 +0000 (03:58 +0000)]
cleanup some of the lifetime/invariant marker stuff, add a big fixme.

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

13 years agoallow specifying an indentation level for the string matcher.
Chris Lattner [Mon, 6 Sep 2010 03:50:59 +0000 (03:50 +0000)]
allow specifying an indentation level for the string matcher.

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

13 years agoemit the __builtin -> intrinsic map with StringMatcher instead of a
Chris Lattner [Mon, 6 Sep 2010 03:14:45 +0000 (03:14 +0000)]
emit the __builtin -> intrinsic map with StringMatcher instead of a
copy of a close relative of it.

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

13 years agosame bug, another place.
Chris Lattner [Mon, 6 Sep 2010 03:12:27 +0000 (03:12 +0000)]
same bug, another place.

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

13 years agofix a critical bug where the generated table would say
Chris Lattner [Mon, 6 Sep 2010 03:11:10 +0000 (03:11 +0000)]
fix a critical bug where the generated table would say
"1 strings to match" in a comment, which isn't gramatic.

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

13 years agoupdate cmake
Chris Lattner [Mon, 6 Sep 2010 02:58:25 +0000 (02:58 +0000)]
update cmake

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

13 years agofactor the snazzy string matcher code that Daniel hates
Chris Lattner [Mon, 6 Sep 2010 02:01:51 +0000 (02:01 +0000)]
factor the snazzy string matcher code that Daniel hates
out of AsmMatcherEmitter.cpp into its own class.

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

13 years agoslightly improve the runtime and code size of the Intrinsics info table by not
Chris Lattner [Mon, 6 Sep 2010 01:44:44 +0000 (01:44 +0000)]
slightly improve the runtime and code size of the Intrinsics info table by not
comparing the "llvm." prefix in the memcmp, and not storing it in the string literal.

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

13 years agospeed up -gvn 3.4% on the testcase in PR7023
Chris Lattner [Mon, 6 Sep 2010 01:26:29 +0000 (01:26 +0000)]
speed up -gvn 3.4% on the testcase in PR7023

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

13 years agoTeach loop rotate to hoist trivially invariant instructions
Chris Lattner [Mon, 6 Sep 2010 01:10:22 +0000 (01:10 +0000)]
Teach loop rotate to hoist trivially invariant instructions
in the duplicated block instead of duplicating them.

Duplicating them into the end of the loop and the preheader
means that we got a phi node in the header of the loop,
which prevented LICM from hoisting them.  GVN would
usually come around later and merge the duplicated
instructions so we'd get reasonable output... except that
anything dependent on the shoulda-been-hoisted value can't
be hoisted.  In PR5319 (which this fixes), a memory value
didn't get promoted.

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

13 years agopull a simple method out of LICM into a new
Chris Lattner [Mon, 6 Sep 2010 01:05:37 +0000 (01:05 +0000)]
pull a simple method out of LICM into a new
Loop::hasLoopInvariantOperands method. Remove
a useless and confusing Loop::isLoopInvariant(Instruction)
method, which didn't do what you thought it did.

No functionality change.

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

13 years agofit in 80 columns and don't crash on exit, fixes PR8080
Chris Lattner [Sun, 5 Sep 2010 23:09:30 +0000 (23:09 +0000)]
fit in 80 columns and don't crash on exit, fixes PR8080

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

13 years agoremove some dead code. t2addrmode_imm8s4 is never used in a
Chris Lattner [Sun, 5 Sep 2010 22:51:11 +0000 (22:51 +0000)]
remove some dead code.  t2addrmode_imm8s4 is never used in a
pattern, so there is no need to define a matching function.

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

13 years agofix inconsistent formatting.
Chris Lattner [Sun, 5 Sep 2010 22:43:56 +0000 (22:43 +0000)]
fix inconsistent formatting.

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

13 years agocleanups: mark stuff static, only tagdecls should be in anon namespaces.
Chris Lattner [Sun, 5 Sep 2010 21:25:43 +0000 (21:25 +0000)]
cleanups: mark stuff static, only tagdecls should be in anon namespaces.

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

13 years agocleanups.
Chris Lattner [Sun, 5 Sep 2010 21:18:45 +0000 (21:18 +0000)]
cleanups.

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

13 years agosome random notes.
Chris Lattner [Sun, 5 Sep 2010 20:49:45 +0000 (20:49 +0000)]
some random notes.

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

13 years agoadd a comment about where this should eventually move.
Chris Lattner [Sun, 5 Sep 2010 20:33:40 +0000 (20:33 +0000)]
add a comment about where this should eventually move.

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

13 years agoupdate this.
Chris Lattner [Sun, 5 Sep 2010 20:22:09 +0000 (20:22 +0000)]
update this.

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

13 years agomore cleanups
Chris Lattner [Sun, 5 Sep 2010 20:13:07 +0000 (20:13 +0000)]
more cleanups

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

13 years agoChange lower atomic pass to use IntrinsicInst to simplify it a bit.
Chris Lattner [Sun, 5 Sep 2010 20:10:47 +0000 (20:10 +0000)]
Change lower atomic pass to use IntrinsicInst to simplify it a bit.

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

13 years agoeliminate some non-obvious casts. UndefValue isa Constant.
Chris Lattner [Sun, 5 Sep 2010 20:03:09 +0000 (20:03 +0000)]
eliminate some non-obvious casts.  UndefValue isa Constant.

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

13 years agofix PR8063, a crash in globalopt in the malloc analysis code.
Chris Lattner [Sun, 5 Sep 2010 17:20:46 +0000 (17:20 +0000)]
fix PR8063, a crash in globalopt in the malloc analysis code.

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

13 years agoAdded initialisers for reduction rule counters.
Lang Hames [Sun, 5 Sep 2010 13:42:32 +0000 (13:42 +0000)]
Added initialisers for reduction rule counters.

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

13 years agoFix warning reported by MSVC++ builder.
Nick Lewycky [Sun, 5 Sep 2010 09:11:38 +0000 (09:11 +0000)]
Fix warning reported by MSVC++ builder.

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

13 years agoSwitch FnSet to containing the ComparableFunction instead of a pointer to one.
Nick Lewycky [Sun, 5 Sep 2010 09:00:32 +0000 (09:00 +0000)]
Switch FnSet to containing the ComparableFunction instead of a pointer to one.
This reduces malloc traffic (yay!) and removes MergeFunctionsEqualityInfo.

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

13 years agoFix many bugs when merging weak-strong and weak-weak pairs. We now merge all
Nick Lewycky [Sun, 5 Sep 2010 08:22:49 +0000 (08:22 +0000)]
Fix many bugs when merging weak-strong and weak-weak pairs. We now merge all
strong functions first to make sure they're the canonical definitions and then
do a second pass looking only for weak functions.

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

13 years agoimplement rdar://6653118 - fastisel should fold loads where possible.
Chris Lattner [Sun, 5 Sep 2010 02:18:34 +0000 (02:18 +0000)]
implement rdar://6653118 - fastisel should fold loads where possible.

Since mem2reg isn't run at -O0, we get a ton of reloads from the stack,
for example, before, this code:

int foo(int x, int y, int z) {
  return x+y+z;
}

used to compile into:

_foo:                                   ## @foo
subq $12, %rsp
movl %edi, 8(%rsp)
movl %esi, 4(%rsp)
movl %edx, (%rsp)
movl 8(%rsp), %edx
movl 4(%rsp), %esi
addl %edx, %esi
movl (%rsp), %edx
addl %esi, %edx
movl %edx, %eax
addq $12, %rsp
ret

Now we produce:

_foo:                                   ## @foo
subq $12, %rsp
movl %edi, 8(%rsp)
movl %esi, 4(%rsp)
movl %edx, (%rsp)
movl 8(%rsp), %edx
addl 4(%rsp), %edx    ## Folded load
addl (%rsp), %edx     ## Folded load
movl %edx, %eax
addq $12, %rsp
ret

Fewer instructions and less register use = faster compiles.

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

13 years agoRemove dead code.
Jakob Stoklund Olesen [Sat, 4 Sep 2010 21:09:33 +0000 (21:09 +0000)]
Remove dead code.

Clobber ranges are no longer used when joining physical registers.
Instead, all aliases are checked for interference.

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

13 years agofix this to work with allocators that have reference type with compilers
Chris Lattner [Sat, 4 Sep 2010 18:45:02 +0000 (18:45 +0000)]
fix this to work with allocators that have reference type with compilers
that diagnose invalid references to references.

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

13 years agodead method.
Chris Lattner [Sat, 4 Sep 2010 18:19:16 +0000 (18:19 +0000)]
dead method.

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

13 years agodelete dead code.
Chris Lattner [Sat, 4 Sep 2010 18:17:16 +0000 (18:17 +0000)]
delete dead code.

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

13 years agozap dead code.
Chris Lattner [Sat, 4 Sep 2010 18:12:00 +0000 (18:12 +0000)]
zap dead code.

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

13 years agoremove dead code, mblaze uses SelectAddrRegImm/SelectAddrRegReg,
Chris Lattner [Sat, 4 Sep 2010 18:02:47 +0000 (18:02 +0000)]
remove dead code, mblaze uses SelectAddrRegImm/SelectAddrRegReg,
not SelectAddr

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

13 years agozap dead code.
Chris Lattner [Sat, 4 Sep 2010 17:45:58 +0000 (17:45 +0000)]
zap dead code.

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

13 years agoRemove the last bit of isShuffleMaskLegal checks and improve the comment regarding...
Bruno Cardoso Lopes [Sat, 4 Sep 2010 02:58:56 +0000 (02:58 +0000)]
Remove the last bit of isShuffleMaskLegal checks and improve the comment regarding mmx shuffles

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

13 years agomake explicit that we not handle several mmx shuffles
Bruno Cardoso Lopes [Sat, 4 Sep 2010 02:50:13 +0000 (02:50 +0000)]
make explicit that we not handle several mmx shuffles

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

13 years agoFix LoopSimplify to notify ScalarEvolution when splitting a loop backedge
Dan Gohman [Sat, 4 Sep 2010 02:42:48 +0000 (02:42 +0000)]
Fix LoopSimplify to notify ScalarEvolution when splitting a loop backedge
into an inner loop, as the new loop iteration may differ substantially.
This fixes PR8078.

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

13 years agoEmit target specific nodes to handle palignr. Do not touch it for MMX versions yet.
Bruno Cardoso Lopes [Sat, 4 Sep 2010 02:36:07 +0000 (02:36 +0000)]
Emit target specific nodes to handle palignr. Do not touch it for MMX versions yet.

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

13 years agoEmit target specific nodes to handle splats starting at zero indicies
Bruno Cardoso Lopes [Sat, 4 Sep 2010 02:02:14 +0000 (02:02 +0000)]
Emit target specific nodes to handle splats starting at zero indicies

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

13 years agoEmit target specific nodes for isPSHUFHWMask and isPSHUFLWMask
Bruno Cardoso Lopes [Sat, 4 Sep 2010 01:36:45 +0000 (01:36 +0000)]
Emit target specific nodes for isPSHUFHWMask and isPSHUFLWMask

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

13 years agoEmit target specific nodes for isSHUFPMask
Bruno Cardoso Lopes [Sat, 4 Sep 2010 01:22:57 +0000 (01:22 +0000)]
Emit target specific nodes for isSHUFPMask

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

13 years agoPrevious isMOVLMask matching already emits targets nodes, remove check
Bruno Cardoso Lopes [Sat, 4 Sep 2010 00:50:08 +0000 (00:50 +0000)]
Previous isMOVLMask matching already emits targets nodes, remove check

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

13 years agoOne more check from the original isShuffleMaskLegal goes away
Bruno Cardoso Lopes [Sat, 4 Sep 2010 00:46:16 +0000 (00:46 +0000)]
One more check from the original isShuffleMaskLegal goes away

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

13 years agoRemove a duplicated but useless check that i've inserted in the previous commit.
Bruno Cardoso Lopes [Sat, 4 Sep 2010 00:43:12 +0000 (00:43 +0000)]
Remove a duplicated but useless check that i've inserted in the previous commit.

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

13 years agoRefactor some code and remove the extra checks for unpckl_undef and unpckh_undef
Bruno Cardoso Lopes [Sat, 4 Sep 2010 00:39:43 +0000 (00:39 +0000)]
Refactor some code and remove the extra checks for unpckl_undef and unpckh_undef

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

13 years agofix a bug in my licm rewrite when a load from the promoted memory
Chris Lattner [Sat, 4 Sep 2010 00:12:30 +0000 (00:12 +0000)]
fix a bug in my licm rewrite when a load from the promoted memory
location is being re-stored to the memory location.  We would get
a dangling pointer from the SSAUpdate data structure and miss a
use.  This fixes PR8068

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