Bruno Cardoso Lopes
f7fee1c185
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.
llvm-svn: 113369
2010-09-08 17:43:25 +00:00
Jim Grosbach
7dfca6fb51
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).
llvm-svn: 113366
2010-09-08 17:22:12 +00:00
Jim Grosbach
53aa5e31e1
Add missing assert
...
llvm-svn: 113365
2010-09-08 17:05:45 +00:00
Tobias Grosser
011d79aeb2
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.
llvm-svn: 113360
2010-09-08 15:02:51 +00:00
Tobias Grosser
e5fcde7d1c
Include original pass name in the PassPrinter's name.
...
llvm-svn: 113359
2010-09-08 15:02:47 +00:00
Roman Divacky
6c27de28b5
Unresolved weak symbols have value equal zero.
...
llvm-svn: 113358
2010-09-08 14:29:45 +00:00
Kalle Raiskila
e542972828
Fix CellSPU vector shuffles, again.
...
Some cases of lowering to rotate were miscompiled.
llvm-svn: 113355
2010-09-08 11:53:38 +00:00
Chris Lattner
2907d2e419
add support for the commuted form of the test instruction, rdar://8018260.
...
llvm-svn: 113352
2010-09-08 05:51:12 +00:00
Chris Lattner
a9ca7837e4
implement proper support for sysret{,l,q}, rdar://8403907
...
llvm-svn: 113350
2010-09-08 05:45:34 +00:00
Chris Lattner
063363fa80
implement the iret suite of instructions properly,
...
fixing rdar://8403974
llvm-svn: 113349
2010-09-08 05:38:31 +00:00
Chris Lattner
086a83afb1
add support for instruction prefixes on the same line as the instruction,
...
implementing rdar://8033482 and PR7254.
llvm-svn: 113348
2010-09-08 05:17:37 +00:00
Chris Lattner
91689c1d0f
change the MC "ParseInstruction" interface to make it the
...
implementation's job to check for and lex the EndOfStatement
marker.
llvm-svn: 113347
2010-09-08 05:10:46 +00:00
Chris Lattner
8caea68a4f
gas accepts xchg <mem>, <reg> as a synonym for xchg <reg>, <mem>.
...
Add this to the mc assembler, fixing PR8061
llvm-svn: 113346
2010-09-08 04:53:27 +00:00
NAKAMURA Takumi
7a23aa081a
ARM/Disassembler: Fix definitions incompatible(unsigned and uint32_t) to Cygwin-1.5, following up to r113255.
...
llvm-svn: 113345
2010-09-08 04:48:17 +00:00
Chris Lattner
4703cb4a96
fix the encoding of the "jump on *cx" family of instructions,
...
rdar://8061602
llvm-svn: 113343
2010-09-08 04:30:51 +00:00
Jim Grosbach
535d3b4e09
remove trailing whitespace
...
llvm-svn: 113338
2010-09-08 03:54:02 +00:00
Jim Grosbach
19cb2f4c67
remove obsolete comment
...
llvm-svn: 113337
2010-09-08 03:51:44 +00:00
Jim Grosbach
261df12f64
disable for the moment while tracking down a few Thumb2-O0 failure that look
...
related. (attempt deux, complete w/ test update this time)
llvm-svn: 113333
2010-09-08 02:00:34 +00:00
Jim Grosbach
b2c950187e
woops. need to update a test along with this.
...
llvm-svn: 113332
2010-09-08 01:49:09 +00:00
Jim Grosbach
7cda56ea6a
disable temporarily while sorting out a few test failures in Thumb2-O0 tests.
...
llvm-svn: 113331
2010-09-08 01:47:49 +00:00
Dan Gohman
64d842ec72
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
queries.
llvm-svn: 113329
2010-09-08 01:32:20 +00:00
Jim Grosbach
136d035e45
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.
llvm-svn: 113323
2010-09-08 00:26:59 +00:00
Jim Grosbach
abcbe2474d
VFP/NEON load/store multiple instructions are addrmode4, not 5.
...
llvm-svn: 113322
2010-09-08 00:25:50 +00:00
Owen Anderson
a4d9c78aa1
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.
llvm-svn: 113306
2010-09-07 23:15:30 +00:00
John McCall
978f007a80
Add documentation for llvm-diff.
...
llvm-svn: 113303
2010-09-07 23:10:21 +00:00
Jakob Stoklund Olesen
4d19d2651d
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
rewriting.
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
physicals.
llvm-svn: 113299
2010-09-07 22:38:45 +00:00
Jim Grosbach
88628e9738
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).
rdar://8394087
llvm-svn: 113297
2010-09-07 22:30:53 +00:00
Devang Patel
3f4abf397c
remove these tests for now.
...
llvm-svn: 113293
2010-09-07 22:03:44 +00:00
Jim Grosbach
9877af3b46
grammar tweak
...
llvm-svn: 113289
2010-09-07 21:30:25 +00:00
Bill Wendling
9040eecb49
Remove untrue comments.
...
llvm-svn: 113287
2010-09-07 21:07:59 +00:00
Bruno Cardoso Lopes
6b1d62c529
Factor out some x86 vector shuffle rewriting and add comments about the direction the shuffle lowering is heading to
...
llvm-svn: 113286
2010-09-07 21:03:14 +00:00
Devang Patel
b0af23a1f6
There is no need to force target if the test is going to run on other x86 platforms.
...
llvm-svn: 113285
2010-09-07 20:59:09 +00:00
Owen Anderson
866e516ead
Remove dead code. ManagedCleanup is unused, and contained a serious bug in that
...
the provided cleanup function is never actually called.
llvm-svn: 113284
2010-09-07 20:53:39 +00:00
Owen Anderson
d12ea002b8
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.
llvm-svn: 113283
2010-09-07 20:48:10 +00:00
Stuart Hastings
420c8a604f
Typo. Thanks to BillW for pointing it out!
...
llvm-svn: 113281
2010-09-07 20:39:07 +00:00
Dan Gohman
9afd666faf
Tidy up the getModRefInfo declarations.
...
llvm-svn: 113275
2010-09-07 20:37:47 +00:00
Bruno Cardoso Lopes
7c483028fb
Move code around to prepare for moving some of the logic together to another function
...
llvm-svn: 113267
2010-09-07 20:20:27 +00:00
Owen Anderson
29ed9459d0
Properly initialize the pImpl member of PassRegistry to zero.
...
llvm-svn: 113264
2010-09-07 20:13:48 +00:00
Owen Anderson
3c8019c94d
Add doxygen comments for PassRegistry.
...
llvm-svn: 113262
2010-09-07 20:04:26 +00:00
Bill Wendling
353802114f
Add an MVT::x86mmx type. It will take the place of all current MMX vector types.
...
llvm-svn: 113261
2010-09-07 20:03:56 +00:00
Chris Lattner
6e27b3e004
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).
llvm-svn: 113260
2010-09-07 20:01:38 +00:00
Evan Cheng
5444b36e01
Remove a dead comment.
...
llvm-svn: 113259
2010-09-07 20:01:10 +00:00
Chris Lattner
29570bd695
rename test.
...
llvm-svn: 113257
2010-09-07 19:57:06 +00:00
Chris Lattner
091012d5d5
hopefully fix a problem building on cygwin-1.5
...
llvm-svn: 113255
2010-09-07 19:50:53 +00:00
Owen Anderson
a74fa15f32
Clean up some of the PassRegistry implementation, and pImpl-ize it to reduce #include clutter
...
and exposing internal details.
llvm-svn: 113252
2010-09-07 19:16:25 +00:00
Bill Wendling
02b701f558
Fix whitespace, because I'm OCD.
...
llvm-svn: 113250
2010-09-07 18:49:14 +00:00
Stuart Hastings
a3188a81c0
Test case for r113248. Raar 8361341.
...
llvm-svn: 113249
2010-09-07 18:43:57 +00:00
Bruno Cardoso Lopes
5a45db3e6c
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
...
llvm-svn: 113247
2010-09-07 18:41:45 +00:00
Bruno Cardoso Lopes
4f5d4b4a6e
Remove now useless check, because the code can be matched below, no need to leave it for isel
...
llvm-svn: 113242
2010-09-07 18:29:03 +00:00
Dan Gohman
d51b43181e
Issue a #error if the host doesn't have an implementation for
...
GetMainExecutable yet.
llvm-svn: 113240
2010-09-07 18:26:49 +00:00
Bruno Cardoso Lopes
c9b3316fea
Minor change. Since the checks are equivalent, use isMMX
...
llvm-svn: 113239
2010-09-07 18:24:00 +00:00
Devang Patel
e50b23e223
Fix command line used to link these test cases.
...
llvm-svn: 113237
2010-09-07 18:17:56 +00:00
Nick Lewycky
1facc1db8f
Update configure for change to autoconf/configure.ac to add PTX backend.
...
llvm-svn: 113236
2010-09-07 18:14:42 +00:00
Nick Lewycky
4c82c6c6fe
Create PTX backend. Patch by Che-Liang Chiou!
...
llvm-svn: 113235
2010-09-07 18:14:24 +00:00
Dale Johannesen
605acfe533
Add patterns for MMX that use the new intrinsics.
...
Enable palignr intrinsic.
These may need adjustment for a new VT in due course.
llvm-svn: 113233
2010-09-07 18:10:56 +00:00
Devang Patel
9dc0e5be58
Reintroduce dbg-declare tests.
...
llvm-svn: 113232
2010-09-07 18:01:49 +00:00
Bruno Cardoso Lopes
f0ea222255
Remove unused target specific node
...
llvm-svn: 113224
2010-09-07 17:38:55 +00:00
Devang Patel
688338eec3
Remove last three tests. I need to make them independent of my setup.
...
llvm-svn: 113213
2010-09-07 17:08:57 +00:00
Devang Patel
55a3bab0d2
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.
...
llvm-svn: 113210
2010-09-07 17:03:44 +00:00
Devang Patel
29a775adf1
Add a test case to check handling of dbg-declare by selection DAG builder.
...
llvm-svn: 113209
2010-09-07 16:56:35 +00:00
Devang Patel
184c81c3e2
Add a test case to check handling of dbg-declare by fast-isel.
...
llvm-svn: 113208
2010-09-07 16:40:53 +00:00
Benjamin Kramer
1ecb978214
Don't leak the old operand when transforming "sldt" into "sldtw".
...
llvm-svn: 113200
2010-09-07 14:40:58 +00:00
Chris Lattner
6282336772
attempt to appease msvc
...
llvm-svn: 113198
2010-09-07 06:10:48 +00:00
Gabor Greif
7f3ce25e6e
fix comment typos
...
llvm-svn: 113197
2010-09-07 06:06:06 +00:00
Nick Lewycky
ad48e01eef
Add completely hokey binary-and and binary-or operations to ConstantRange and
...
teach LazyValueInfo to use them.
llvm-svn: 113196
2010-09-07 05:39:02 +00:00
Nick Lewycky
71972d45dc
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.
llvm-svn: 113190
2010-09-07 01:42:10 +00:00
Chris Lattner
30bb384944
add missing cmov aliases, this resolves rdar://8208499
...
llvm-svn: 113189
2010-09-07 00:05:45 +00:00
Chris Lattner
3ae9398d5f
remove duplicated entry
...
llvm-svn: 113188
2010-09-06 23:57:24 +00:00
Nick Lewycky
a35462da3d
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.
llvm-svn: 113187
2010-09-06 23:52:49 +00:00
Chris Lattner
7ece716da2
"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
llvm-svn: 113186
2010-09-06 23:51:44 +00:00
Chris Lattner
415e04fad2
fix rdar://8017621 - llvm-mc can't guess encoding for "push $(1000)"
...
llvm-svn: 113184
2010-09-06 23:40:56 +00:00
Chris Lattner
abfe4223c2
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.
llvm-svn: 113183
2010-09-06 23:37:39 +00:00
Chris Lattner
34e366b45c
fix the operand constraints of the immediate form of in/out,
...
allowing unsigned 8-bit operands. This fixes rdar://8208481
llvm-svn: 113182
2010-09-06 23:29:05 +00:00
Chris Lattner
339cc7bfef
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.
llvm-svn: 113178
2010-09-06 22:11:18 +00:00
Chris Lattner
628fbecf4f
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"
llvm-svn: 113176
2010-09-06 21:54:15 +00:00
Chris Lattner
c0658cbd16
simplify DEBUG_WITH_TYPE usage
...
llvm-svn: 113174
2010-09-06 21:28:52 +00:00
Chris Lattner
c4521d1b5f
this if can now be an assert.
...
llvm-svn: 113173
2010-09-06 21:25:43 +00:00
Chris Lattner
9026ac0edd
;
...
llvm-svn: 113172
2010-09-06 21:23:43 +00:00
Chris Lattner
8130197937
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
llvm-svn: 113171
2010-09-06 21:22:45 +00:00
Chris Lattner
6b6f3dd994
emit the match table at global scope instead of within the
...
MatchInstructionImpl. This makes it easier to read/understand
MatchInstructionImpl.
llvm-svn: 113170
2010-09-06 21:08:38 +00:00
Chris Lattner
82d88ced92
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.
llvm-svn: 113169
2010-09-06 21:01:37 +00:00
Chris Lattner
fdb7decfaf
The "ambiguous instructions" check only produces anything with -debug,
...
so only do the N^2 loop with debug mode.
llvm-svn: 113168
2010-09-06 20:21:47 +00:00
Chris Lattner
31c63fb518
simplify the hacks around jrcxz.
...
llvm-svn: 113167
2010-09-06 20:10:12 +00:00
Chris Lattner
b4be28f33d
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).
llvm-svn: 113166
2010-09-06 20:08:02 +00:00
Chris Lattner
a22a368e7c
change MatchInstructionImpl to return an enum instead of bool.
...
llvm-svn: 113165
2010-09-06 19:22:17 +00:00
Chris Lattner
8128ca1c2c
add note
...
llvm-svn: 113164
2010-09-06 19:14:40 +00:00
Chris Lattner
3e4582ada5
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.
llvm-svn: 113163
2010-09-06 19:11:01 +00:00
Eric Christopher
b33877b710
Regenerate.
...
llvm-svn: 113160
2010-09-06 18:47:10 +00:00
Eric Christopher
1243b9df84
Update to 2.9 post-2.8 branch.
...
llvm-svn: 113159
2010-09-06 18:47:00 +00:00
Roman Divacky
e1278b57f9
Redefine LOOP* instructions from I to Ii8PCRel as they take an i8 argument.
...
llvm-svn: 113158
2010-09-06 18:43:14 +00:00
Chris Lattner
4cfbcdc7b6
random cleanups
...
llvm-svn: 113157
2010-09-06 18:32:06 +00:00
Benjamin Kramer
3723ba1fe0
MCELF: Align symtab, relocation sections and section headers properly. Patch by Krister Wombell.
...
llvm-svn: 113155
2010-09-06 16:11:52 +00:00
Chris Lattner
963debc109
compute the HasSSE3 bit correctly, patch by Nikolai Saoukh.
...
llvm-svn: 113147
2010-09-06 05:19:44 +00:00
Chris Lattner
be9019090e
fix PR8067, an over-aggressive assertion in LICM.
...
llvm-svn: 113146
2010-09-06 05:11:24 +00:00
Chris Lattner
07b332f0a0
emit the LLVM intrinsic name -> intrinsic number mapping table with
...
StringMatcher instead of a linear sequence of memcmps.
llvm-svn: 113145
2010-09-06 03:58:45 +00:00
Chris Lattner
a58edd1df3
cleanup some of the lifetime/invariant marker stuff, add a big fixme.
...
llvm-svn: 113144
2010-09-06 03:58:04 +00:00
Chris Lattner
96fe532c67
allow specifying an indentation level for the string matcher.
...
llvm-svn: 113143
2010-09-06 03:50:59 +00:00
Chris Lattner
497d13e82b
emit the __builtin -> intrinsic map with StringMatcher instead of a
...
copy of a close relative of it.
llvm-svn: 113142
2010-09-06 03:14:45 +00:00
Chris Lattner
6dcaa42540
same bug, another place.
...
llvm-svn: 113141
2010-09-06 03:12:27 +00:00
Chris Lattner
9bb3bf1b59
fix a critical bug where the generated table would say
...
"1 strings to match" in a comment, which isn't gramatic.
llvm-svn: 113140
2010-09-06 03:11:10 +00:00
Chris Lattner
69b5913500
update cmake
...
llvm-svn: 113139
2010-09-06 02:58:25 +00:00
Chris Lattner
ca5a3554b5
factor the snazzy string matcher code that Daniel hates
...
out of AsmMatcherEmitter.cpp into its own class.
llvm-svn: 113137
2010-09-06 02:01:51 +00:00
Chris Lattner
fb43da66b5
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.
llvm-svn: 113136
2010-09-06 01:44:44 +00:00
Chris Lattner
e34c835bde
speed up -gvn 3.4% on the testcase in PR7023
...
llvm-svn: 113135
2010-09-06 01:26:29 +00:00
Chris Lattner
b01c24a945
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.
llvm-svn: 113134
2010-09-06 01:10:22 +00:00
Chris Lattner
da24b9a49a
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.
llvm-svn: 113133
2010-09-06 01:05:37 +00:00
Chris Lattner
7b7768a269
fit in 80 columns and don't crash on exit, fixes PR8080
...
llvm-svn: 113123
2010-09-05 23:09:30 +00:00
Chris Lattner
f43cb302ca
remove some dead code. t2addrmode_imm8s4 is never used in a
...
pattern, so there is no need to define a matching function.
llvm-svn: 113122
2010-09-05 22:51:11 +00:00
Chris Lattner
15bd17e572
fix inconsistent formatting.
...
llvm-svn: 113121
2010-09-05 22:43:56 +00:00
Chris Lattner
accb015f7c
cleanups: mark stuff static, only tagdecls should be in anon namespaces.
...
llvm-svn: 113120
2010-09-05 21:25:43 +00:00
Chris Lattner
e40007a71b
cleanups.
...
llvm-svn: 113119
2010-09-05 21:18:45 +00:00
Chris Lattner
8c26cee3f3
some random notes.
...
llvm-svn: 113118
2010-09-05 20:49:45 +00:00
Chris Lattner
419d0aa0ed
add a comment about where this should eventually move.
...
llvm-svn: 113117
2010-09-05 20:33:40 +00:00
Chris Lattner
5cac0f71ca
update this.
...
llvm-svn: 113116
2010-09-05 20:22:09 +00:00
Chris Lattner
1edf7434cf
more cleanups
...
llvm-svn: 113115
2010-09-05 20:13:07 +00:00
Chris Lattner
e6214557e7
Change lower atomic pass to use IntrinsicInst to simplify it a bit.
...
llvm-svn: 113114
2010-09-05 20:10:47 +00:00
Chris Lattner
05ef361b5e
eliminate some non-obvious casts. UndefValue isa Constant.
...
llvm-svn: 113113
2010-09-05 20:03:09 +00:00
Chris Lattner
72d283c826
fix PR8063, a crash in globalopt in the malloc analysis code.
...
llvm-svn: 113109
2010-09-05 17:20:46 +00:00
Lang Hames
64a4a13617
Added initialisers for reduction rule counters.
...
llvm-svn: 113108
2010-09-05 13:42:32 +00:00
Nick Lewycky
e3ac69eca3
Fix warning reported by MSVC++ builder.
...
llvm-svn: 113106
2010-09-05 09:11:38 +00:00
Nick Lewycky
f3a07ec394
Switch FnSet to containing the ComparableFunction instead of a pointer to one.
...
This reduces malloc traffic (yay!) and removes MergeFunctionsEqualityInfo.
llvm-svn: 113105
2010-09-05 09:00:32 +00:00
Nick Lewycky
0095937b13
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.
llvm-svn: 113104
2010-09-05 08:22:49 +00:00
Chris Lattner
eeba0c73e5
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.
llvm-svn: 113102
2010-09-05 02:18:34 +00:00
Jakob Stoklund Olesen
313358fef9
Remove dead code.
...
Clobber ranges are no longer used when joining physical registers.
Instead, all aliases are checked for interference.
llvm-svn: 113084
2010-09-04 21:09:33 +00:00
Chris Lattner
f20ca8028d
fix this to work with allocators that have reference type with compilers
...
that diagnose invalid references to references.
llvm-svn: 113078
2010-09-04 18:45:02 +00:00
Chris Lattner
0963048185
dead method.
...
llvm-svn: 113077
2010-09-04 18:19:16 +00:00
Chris Lattner
2f095c636a
delete dead code.
...
llvm-svn: 113075
2010-09-04 18:17:16 +00:00
Chris Lattner
65b48b5dfc
zap dead code.
...
llvm-svn: 113073
2010-09-04 18:12:00 +00:00
Chris Lattner
55118e7224
remove dead code, mblaze uses SelectAddrRegImm/SelectAddrRegReg,
...
not SelectAddr
llvm-svn: 113072
2010-09-04 18:02:47 +00:00
Chris Lattner
b1951ea1fe
zap dead code.
...
llvm-svn: 113071
2010-09-04 17:45:58 +00:00
Bruno Cardoso Lopes
c6accda78e
Remove the last bit of isShuffleMaskLegal checks and improve the comment regarding mmx shuffles
...
llvm-svn: 113059
2010-09-04 02:58:56 +00:00
Bruno Cardoso Lopes
731bcc1abf
make explicit that we not handle several mmx shuffles
...
llvm-svn: 113058
2010-09-04 02:50:13 +00:00
Dan Gohman
487e250109
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.
llvm-svn: 113057
2010-09-04 02:42:48 +00:00
Bruno Cardoso Lopes
20779ee157
Emit target specific nodes to handle palignr. Do not touch it for MMX versions yet.
...
llvm-svn: 113056
2010-09-04 02:36:07 +00:00
Bruno Cardoso Lopes
cff7cd18ab
Emit target specific nodes to handle splats starting at zero indicies
...
llvm-svn: 113055
2010-09-04 02:02:14 +00:00
Bruno Cardoso Lopes
95759917eb
Emit target specific nodes for isPSHUFHWMask and isPSHUFLWMask
...
llvm-svn: 113050
2010-09-04 01:36:45 +00:00
Bruno Cardoso Lopes
2b57008c72
Emit target specific nodes for isSHUFPMask
...
llvm-svn: 113048
2010-09-04 01:22:57 +00:00
Bruno Cardoso Lopes
2f7af36134
Previous isMOVLMask matching already emits targets nodes, remove check
...
llvm-svn: 113047
2010-09-04 00:50:08 +00:00
Bruno Cardoso Lopes
9f8e704151
One more check from the original isShuffleMaskLegal goes away
...
llvm-svn: 113045
2010-09-04 00:46:16 +00:00
Bruno Cardoso Lopes
16959372bb
Remove a duplicated but useless check that i've inserted in the previous commit.
...
llvm-svn: 113044
2010-09-04 00:43:12 +00:00
Bruno Cardoso Lopes
44578d38d3
Refactor some code and remove the extra checks for unpckl_undef and unpckh_undef
...
llvm-svn: 113043
2010-09-04 00:39:43 +00:00
Chris Lattner
50506787d1
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
llvm-svn: 113042
2010-09-04 00:12:30 +00:00
Bruno Cardoso Lopes
7829d0e74b
Remove check for unpckh mask
...
llvm-svn: 113035
2010-09-03 23:32:47 +00:00
Bruno Cardoso Lopes
d1dacc57aa
Remove check for unpckl mask
...
llvm-svn: 113034
2010-09-03 23:31:50 +00:00
Bruno Cardoso Lopes
207b9d6218
Inline isShuffleMaskLegal into LowerVECTOR_SHUFFLE, so we can start
...
checking each standalone condition and decide whether emit target
specific nodes or remove the condition if it's already matched before.
llvm-svn: 113031
2010-09-03 23:24:06 +00:00
Owen Anderson
c91c1a205a
Propagate non-local comparisons. Fixes PR1757.
...
llvm-svn: 113025
2010-09-03 22:47:08 +00:00
Eric Christopher
0acd994f90
Reapply this increase to the number of virtual registers. All of the
...
various breakages appear to be dealt with.
Patch by Pekka Jääskeläinen.
llvm-svn: 113024
2010-09-03 22:46:31 +00:00
Dan Gohman
47bec3cb57
Disable the asserts that check that normalization is perfectly
...
invertible. ScalarEvolution's folding routines don't always succeed
in canonicalizing equal expressions to a single canonical form, and
this can cause these asserts to fail, even though there's no actual
correctness problem. This fixes PR8066.
llvm-svn: 113021
2010-09-03 22:12:56 +00:00
Bruno Cardoso Lopes
2bef20eda7
Reapply considered harmfull part of rr112934 and r112942.
...
"Use target specific nodes instead of relying in unpckl and
unpckh pattern fragments during isel time. Also place a
depth limit in getShuffleScalarElt.
llvm-svn: 113020
2010-09-03 22:09:41 +00:00
Jim Grosbach
005155e236
previous patch was a little too tricky for its own good. Don't try to
...
overload UserInInstr. Explicitly check Allocatable. The early exit in the
condition will mean the performance impact of the extra test should be
minimal.
llvm-svn: 113016
2010-09-03 21:45:15 +00:00
Dale Johannesen
367afb5a00
Remove the rest of the nonexistent 64-bit AVX instructions.
...
Bruno, please review.
llvm-svn: 113014
2010-09-03 21:23:00 +00:00
David Greene
2a9de4d828
Generalize getFieldType to work on all TypedInits. Add a couple of testcases from
...
Amaury Pouly.
llvm-svn: 113010
2010-09-03 21:00:49 +00:00
Bruno Cardoso Lopes
a750d994fe
Reapply last harmless part of r112934, the pattern fragment to match X86Unpcklpd
...
llvm-svn: 113009
2010-09-03 20:44:26 +00:00
Bruno Cardoso Lopes
fe8717c573
Reintroduce a simple function refactoring done in r112934, also without any functionality changes
...
llvm-svn: 113008
2010-09-03 20:20:02 +00:00
Bruno Cardoso Lopes
48e589b122
Reapply piecies of r112942 and r112934 which don't do
...
functional changes
llvm-svn: 113007
2010-09-03 20:10:35 +00:00
Bruno Cardoso Lopes
6979cf0808
Reapply Fix comment
...
llvm-svn: 113006
2010-09-03 19:55:05 +00:00
Daniel Dunbar
6f3da24d70
Revert r112934, "- Use specific nodes to match unpckl masks.", which introduced
...
some infinite loop and select failures.
- Apologies for eager reverting, but its branch day.
llvm-svn: 113000
2010-09-03 19:38:11 +00:00
Daniel Dunbar
f1aacd55c0
Revert r112938 "Fix comment", which depends on r112934, which introduced some
...
infinite loop and select failures.
llvm-svn: 112999
2010-09-03 19:38:08 +00:00
Daniel Dunbar
0ffe4db45c
Revert r112942, "Use punpckh and unpckh family of nodes instead of using unpckh
...
mask pattern fragment", which depends on r112934, which introduced some infinite
loop and select failures.
llvm-svn: 112998
2010-09-03 19:38:05 +00:00
Bob Wilson
3626a8c136
Add a missing check when legalizing a vector extending load. This doesn't
...
solve the root problem, but it corrects the bug in the code I added to
support legalizing in the case where the non-extended type is also legal.
llvm-svn: 112997
2010-09-03 19:20:37 +00:00
Bill Wendling
78395e4b8a
Get rid of "passing signed into unsigned parameter" warning on PPC.
...
llvm-svn: 112995
2010-09-03 19:09:46 +00:00
Owen Anderson
c725462245
Add support for simplifying a load from a computed value to a load from a global when it
...
is provable that they're equivalent. This fixes PR4855.
llvm-svn: 112994
2010-09-03 19:08:37 +00:00
Bill Wendling
cef985bc7e
Quiesce warning about non-virtual d'tor in virtual class.
...
llvm-svn: 112991
2010-09-03 18:41:20 +00:00
Jim Grosbach
03f4be86ba
Re-apply r112883:
...
"For ARM stack frames that utilize variable sized objects and have either
large local stack areas or require dynamic stack realignment, allocate a
base register via which to access the local frame. This allows efficient
access to frame indices not accessible via the FP (either due to being out
of range or due to dynamic realignment) or the SP (due to variable sized
object allocation). In particular, this greatly improves efficiency of access
to spill slots in Thumb functions which contain VLAs."
r112986 fixed a latent bug exposed by the above.
llvm-svn: 112989
2010-09-03 18:37:12 +00:00
Jakob Stoklund Olesen
662fecd654
VirtRegRewriter checks for early clobbers before it reuses an available stack
...
slot.
Teach it to also check for early clobbered aliases, and early clobber operands
following the current operand.
This fixes the miscompilation in PR8044 where EC registers eax and ecx were
being used for inputs.
llvm-svn: 112988
2010-09-03 18:36:56 +00:00
Owen Anderson
064cb4c807
Add a test for PR4413, which was apparently fixed at some point in the past.
...
llvm-svn: 112987
2010-09-03 18:33:08 +00:00
Jim Grosbach
21a2a2579f
Check the local frame alignment for determining whether dynamic stack
...
alignment should be performed. Otherwise dynamic realignment may trigger
when the register allocator has already used the frame pointer as a general
purpose register. That is, we need to make sure that the list of reserved
registers doesn't change after register allocation.
llvm-svn: 112986
2010-09-03 18:28:19 +00:00
Jim Grosbach
0d5372679c
Add 'const' to getter function.
...
llvm-svn: 112984
2010-09-03 18:17:16 +00:00
Bob Wilson
35fafca587
Finish converting the rest of the NEON VLD instructions to use pseudo-
...
instructions prior to regalloc. Since it's getting a little close to
the 2.8 branch deadline, I'll have to leave the rest of the instructions
handled by the NEONPreAllocPass for now, but I didn't want to leave half
of the VLD instructions converted and the other half not.
llvm-svn: 112983
2010-09-03 18:16:02 +00:00
Dan Gohman
39dadbac5c
Remove a TODO comment; this is now filed in bugzilla (PR8005).
...
llvm-svn: 112982
2010-09-03 18:06:11 +00:00
Dan Gohman
02ab9a69b9
Fix Windows stuff to follow the existing source organization.
...
llvm-svn: 112976
2010-09-03 17:29:33 +00:00
Owen Anderson
50d8c8888c
Add PR number to test.
...
llvm-svn: 112971
2010-09-03 16:58:25 +00:00
Mikhail Glushenkov
d2b5336ae7
Rename 'libprofile/exported_symbols.lst' to 'libprofile/libprofile.exports'.
...
Makefile.rules assumes that all EXPORTED_SYMBOL_FILEs have the .exports
extension.
llvm-svn: 112964
2010-09-03 15:42:45 +00:00
Mikhail Glushenkov
a15f44daa8
Revert "Rules for win32 ld shouldn't fire when cross-compiling."
...
This reverts commit 012b374e5b46fe93a8fdf605f5929fa8239e0960.
llvm-svn: 112963
2010-09-03 15:42:38 +00:00
Daniel Dunbar
2ac3386ef3
Revert "For ARM stack frames that utilize variable sized objects and have either", it is breaking oggenc with Clang for ARMv6.
...
This reverts commit 8d6e29cfda270be483abf638850311670829ee65.
llvm-svn: 112962
2010-09-03 15:26:42 +00:00
Benjamin Kramer
8fd07c026e
Zap dead code.
...
llvm-svn: 112955
2010-09-03 12:13:18 +00:00
Mikhail Glushenkov
60b696db37
Rules for win32 ld shouldn't fire when cross-compiling.
...
llvm-svn: 112954
2010-09-03 09:57:52 +00:00
Duncan Sands
bc42c906bb
Reapply commit 112702 which was speculatively reverted by echristo.
...
Original commit message:
Use the SSAUpdator to turn calls to eh.exception that are not in a
landing pad into uses of registers rather than loads from a stack
slot. Doesn't touch the 'orrible hack code - Bill needs to persuade
me harder :)
llvm-svn: 112952
2010-09-03 08:31:48 +00:00
Owen Anderson
14431a1cb8
Re-enable CorrelatedValuePropagation. I've tested nightly tests, llvm-gcc
...
bootstrap, and clang self-host.
llvm-svn: 112948
2010-09-03 04:16:28 +00:00
NAKAMURA Takumi
24d039ebe3
test/CodeGen/X86: Add explicit -mtriple=(i686|x86_64)-linux for Win32 host.
...
llvm-svn: 112947
2010-09-03 03:24:08 +00:00
Oscar Fuentes
e16dc06159
Fix cmake build without native target selected.
...
The cmake (+ MSVC) build is broken if you don't select your native
target.
e.g. 'cmake -D LLVM_TARGETS_TO_BUILD="MyNonNativeTarget" .'
This is because cmake currently sets the LLVM_NATIVE_* definitions
regardless of whether the native target is selected (causing build
errors).
Patch by Mike Gist!
llvm-svn: 112946
2010-09-03 02:22:23 +00:00
Bruno Cardoso Lopes
d6634a5b2e
AVX doesn't support mm operations neither its instrinsics.
...
The AVX versions of PALIGN and PABS* should only exist for
128-bit. Remove the unnecessary stuff.
llvm-svn: 112944
2010-09-03 02:08:45 +00:00
Bruno Cardoso Lopes
a85ec10483
Use punpckh and unpckh family of nodes instead of using unpckh mask pattern fragment
...
llvm-svn: 112942
2010-09-03 01:39:08 +00:00
Bob Wilson
f65c9ef720
Replace NEON vabdl, vaba, and vabal intrinsics with combinations of the
...
vabd intrinsic and add and/or zext operations. In the case of vaba, this
also avoids the need for a DAG combine pattern to combine vabd with add.
Update tests. Auto-upgrade the old intrinsics.
llvm-svn: 112941
2010-09-03 01:35:08 +00:00
Bruno Cardoso Lopes
adc6bca2dd
Fix comment
...
llvm-svn: 112938
2010-09-03 01:28:51 +00:00
Bruno Cardoso Lopes
cce44678b4
- Use specific nodes to match unpckl masks.
...
- Teach getShuffleScalarElt how to handle more target
specific nodes, so the DAGCombine can make use of it.
- Add another hack to avoid the node update problem
during legalization. More description on the comments
llvm-svn: 112934
2010-09-03 01:24:00 +00:00
Jakob Stoklund Olesen
99d82f2e8b
Stop emitting predicate functions. They are no longer used.
...
llvm-svn: 112924
2010-09-03 00:39:50 +00:00
Eric Christopher
6aaed72949
Simple branch instruction support.
...
llvm-svn: 112923
2010-09-03 00:35:47 +00:00
Jakob Stoklund Olesen
08aede2538
Don't call Predicate_* from X86 target.
...
llvm-svn: 112921
2010-09-03 00:35:18 +00:00
Jakob Stoklund Olesen
d7dcbb57fb
Remove Predicate_* calls from MBlaze and XCore
...
llvm-svn: 112920
2010-09-03 00:35:16 +00:00
Jakob Stoklund Olesen
44a2797e02
Remove Predicate_* calls from Mips
...
llvm-svn: 112919
2010-09-03 00:35:13 +00:00
Eric Christopher
c3e118ef3d
Add basic support for materializing constants (including fp) and
...
stores.
llvm-svn: 112912
2010-09-02 23:43:26 +00:00
Chris Lattner
7bf4b82e97
update one more test
...
llvm-svn: 112910
2010-09-02 23:32:55 +00:00
Chris Lattner
fc561bad88
this is a release note worthy change.
...
llvm-svn: 112907
2010-09-02 23:22:50 +00:00
Chris Lattner
7f2f0930a7
add a new "llvm-dis -show-annotations" option, which causes it to print
...
#uses comments, with a testcase.
llvm-svn: 112906
2010-09-02 23:21:44 +00:00
Chris Lattner
ad074cb3f2
lets get crazy and name the header file the exact class name,
...
not a scrunched version of it.
llvm-svn: 112904
2010-09-02 23:09:42 +00:00
Chris Lattner
82570a04df
AsmPrinter has a formatted stream, pass it down through AsmAnnotationWriter
...
llvm-svn: 112903
2010-09-02 23:07:12 +00:00
Anton Korobeynikov
a5a645559c
Properly emit __chkstk call instead of __alloca on non-mingw windows targets.
...
Patch by Cameron Esfahani!
llvm-svn: 112902
2010-09-02 23:03:46 +00:00
Chris Lattner
19199cce55
stop forcing a noop AssemblyAnnotationWriter to silence #uses
...
comments, these don't happen anymore.
llvm-svn: 112901
2010-09-02 23:03:10 +00:00
Devang Patel
854ad26ae2
There is no need to use .set here.
...
Thanks Chris!
llvm-svn: 112900
2010-09-02 23:01:10 +00:00