Chris Lattner
c89e98d63b
clean up some code, eliminate NodeIsComplexPattern, which
...
does the same thing as getComplexPatternInfo.
llvm-svn: 96411
2010-02-16 23:13:59 +00:00
Bill Wendling
964b01232c
Make error statement more personal.
...
llvm-svn: 96410
2010-02-16 22:47:14 +00:00
Chris Lattner
617c3a5c69
fix indentation
...
llvm-svn: 96409
2010-02-16 22:38:31 +00:00
Chris Lattner
0d35c68d5c
fix rdar://7653908, a crash on a case where we would fold a load
...
into a roundss intrinsic, producing a cyclic dag. The root cause
of this is badness handling ComplexPattern nodes in the old dagisel
that I noticed through inspection. Eliminate a copy of the of the
code that handled ComplexPatterns by making EmitChildMatchCode call
into EmitMatchCode.
llvm-svn: 96408
2010-02-16 22:35:06 +00:00
Dale Johannesen
60d48aef7b
Adjust register numbers in tests to compensate for the
...
new lack of R2.
llvm-svn: 96407
2010-02-16 22:31:31 +00:00
Chris Lattner
008f62bfa2
filecheckize
...
llvm-svn: 96404
2010-02-16 22:13:43 +00:00
Bob Wilson
ed0eab5843
Handle tGPR register class in a few more places. This fixes some llvm-gcc
...
build failures due to my fix for pr6111.
llvm-svn: 96402
2010-02-16 22:01:59 +00:00
Johnny Chen
7171461638
Add SMC (Secure Monitor Call) system instruction for disassembly only.
...
llvm-svn: 96401
2010-02-16 21:59:54 +00:00
Dale Johannesen
f31a06506f
Really reserve R2 on PPC Darwin. PR 6314.
...
llvm-svn: 96399
2010-02-16 21:53:27 +00:00
Devang Patel
bebe8e55dc
Use line and column number to distinguish two lexical blocks at the same level.
...
llvm-svn: 96395
2010-02-16 21:39:34 +00:00
Jim Grosbach
2acf602672
80 column cleanup
...
llvm-svn: 96393
2010-02-16 21:23:02 +00:00
Devang Patel
1b865d88f9
New testcase.
...
llvm-svn: 96391
2010-02-16 21:16:08 +00:00
Evan Cheng
ee44d6a752
Look for SSE and instructions of this form: (and x, (build_vector c1,c2,c3,c4)).
...
If there exists a use of a build_vector that's the bitwise complement of the mask,
then transform the node to
(and (xor x, (build_vector -1,-1,-1,-1)), (build_vector ~c1,~c2,~c3,~c4)).
Since this transformation is only useful when 1) the given build_vector will
become a load from constpool, and 2) (and (xor x -1), y) matches to a single
instruction, I decided this is appropriate as a x86 specific transformation.
rdar://7323335
llvm-svn: 96389
2010-02-16 21:09:44 +00:00
Jim Grosbach
0c678d7b17
Remove trailing whitespace
...
llvm-svn: 96388
2010-02-16 21:07:46 +00:00
Bob Wilson
86dded571f
Rename SuccessorNumber to GetSuccessorNumber.
...
llvm-svn: 96387
2010-02-16 21:06:42 +00:00
David Greene
c10133139e
Add support for emitting non-temporal stores for DAGs marked
...
non-temporal. Fix from r96241 for botched encoding of MOVNTDQ.
Add documentation for !nontemporal metadata.
Add a simpler movnt testcase.
llvm-svn: 96386
2010-02-16 20:50:18 +00:00
Bob Wilson
7bb549dc8e
Testcase for critical edge splitting with load PRE.
...
llvm-svn: 96385
2010-02-16 20:48:55 +00:00
Jim Grosbach
0c8c072ddf
Update Thumb2 to not use CarryDefIsUnused or CarryDefIsUsed predicates, but
...
to have the predicate on the pattern itself instead. Support for the new
ISel. Remove definitions of CarryDefIsUnused and CarryDefIsUsed since they are
no longer used anywhere.
llvm-svn: 96384
2010-02-16 20:42:29 +00:00
Jim Grosbach
27e3b55717
Remove redundant setting of Defs. CPSR is already marked by the block level set of Defs.
...
llvm-svn: 96383
2010-02-16 20:35:59 +00:00
Dan Gohman
e2da5181db
Refactor rewriting for PHI nodes into a separate function.
...
llvm-svn: 96382
2010-02-16 20:25:07 +00:00
Jim Grosbach
872d6b21aa
First step in eliminating the CarryDefIsUnused and CarryDefIsUsed predicates.
...
They won't work with the new ISel mechanism, as Requires predicates are no
longer allowed to reference the node being selected. Moving the predicate to
the patterns instead solves the problem.
This patch handles ARM mode. Thumb2 will follow.
llvm-svn: 96381
2010-02-16 20:17:57 +00:00
Johnny Chen
900ebc03c5
Added for disassembly the following instructions:
...
o Store Return State (SRSW, SRS)
o Load/Store Coprocessor (LDC/STC and friends)
o MSR (immediate)
llvm-svn: 96380
2010-02-16 20:04:27 +00:00
Bob Wilson
a866c660db
Split critical edges as needed for load PRE.
...
llvm-svn: 96378
2010-02-16 19:51:59 +00:00
Bob Wilson
1115365fcf
Refactor to share code to find the position of a basic block successor in the
...
terminator's list of successors.
llvm-svn: 96377
2010-02-16 19:49:17 +00:00
Dan Gohman
815d966a5a
Fix whitespace.
...
llvm-svn: 96372
2010-02-16 19:42:34 +00:00
Kenneth Uildriks
13195c9525
Function attributes have index ~0, not 0
...
llvm-svn: 96370
2010-02-16 19:28:02 +00:00
Chris Lattner
cafd2c75a1
simplify this code. In the new world order there is no
...
need to scan the entire subtree of the pattern anymore.
llvm-svn: 96369
2010-02-16 19:19:58 +00:00
Chris Lattner
ebcd505b14
convert the new matcher to check intermediate nodes for a single
...
use and only call IsProfitableToFold/IsLegalToFold on the load
being folded, like the old dagiselemitter does. This
substantially simplifies the code and improves opportunities for
sharing.
llvm-svn: 96368
2010-02-16 19:15:55 +00:00
Chris Lattner
eba9f75b00
change dag isel emitter to only call 'IsProfitableToFold' on nodes
...
with chains. On interior nodes that lead up to them, we just directly
check that there is a single use. This generates slightly more
efficient code.
llvm-svn: 96366
2010-02-16 19:03:34 +00:00
Bob Wilson
94eef3fc13
Fix pr6111: Avoid using the LR register for the target address of an indirect
...
branch in ARM v4 code, since it gets clobbered by the return address before
it is used. Instead of adding a new register class containing all the GPRs
except LR, just use the existing tGPR class.
llvm-svn: 96360
2010-02-16 17:24:15 +00:00
Duncan Sands
e9a13a3c60
Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move some
...
methods to try to have the type predicates be more logically positioned.
llvm-svn: 96349
2010-02-16 14:50:09 +00:00
Duncan Sands
1b33dd3c83
There are two ways of checking for a given type, for example isa<PointerType>(T)
...
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.
llvm-svn: 96344
2010-02-16 11:11:14 +00:00
Benjamin Kramer
32ff92be51
Minor warning fixes (semicolons, newline at EOF).
...
llvm-svn: 96343
2010-02-16 10:25:04 +00:00
Chris Lattner
2507e6b51f
mark all the generated node predicates 'const'.
...
llvm-svn: 96337
2010-02-16 07:26:36 +00:00
Chris Lattner
a9550b6d27
generate code for node and pattern predicates. Note that this won't
...
build if enabled, it will fail with constness issues. I'll resolve
these next.
llvm-svn: 96336
2010-02-16 07:21:10 +00:00
Chris Lattner
5a026d7367
refactor some code into a local class.
...
llvm-svn: 96334
2010-02-16 06:52:01 +00:00
Chris Lattner
eb72054cb3
remove now dead code and fixme.
...
llvm-svn: 96333
2010-02-16 06:15:00 +00:00
Chris Lattner
5901090df8
remove dead code. This is never generated for any targets in mainline.
...
llvm-svn: 96332
2010-02-16 06:14:22 +00:00
Chris Lattner
104828612b
add support for the new isel matcher to generate
...
(isprofitable|islegal)tofold checks.
llvm-svn: 96331
2010-02-16 06:10:58 +00:00
Chris Lattner
b29b154904
make pcrel immediate values relative to the start of the field,
...
not the end of the field, fixing rdar://7651978
llvm-svn: 96330
2010-02-16 05:03:17 +00:00
Erick Tryzelaar
f4ca539af4
Fix a typo in an LLVMOpcode enum. LLVMTrunk -> LLVMTrunc.
...
llvm-svn: 96324
2010-02-16 03:45:23 +00:00
Erick Tryzelaar
f6e2c05ad6
Fix some ocaml documentation
...
llvm-svn: 96323
2010-02-16 03:45:17 +00:00
Sanjiv Gupta
29190e6398
The code section for an ISR has a specific address.
...
Currently, whether a function is ISR or not is encoded in the section attribute for that function.
llvm-svn: 96322
2010-02-16 03:41:07 +00:00
Dale Johannesen
622053fec3
Handle DBG_VALUE mixed with labels when doing PHI
...
elimination. Before a DBG_VALUE could affect codegen.
The solution here is imperfect and not final.
llvm-svn: 96318
2010-02-16 01:57:28 +00:00
Rafael Espindola
8962ca0e05
Drop support for the InReg attribute on the ppc backend. This was used by
...
llvm-gcc but has been replaced with pad argument which don't need any
special backend support.
llvm-svn: 96312
2010-02-16 01:50:18 +00:00
Dan Gohman
d19ecedc40
Split the main for-each-use loop again, this time for GenerateTruncates,
...
as it also peeks at which registers are being used by other uses. This
makes LSR less sensitive to use-list order.
llvm-svn: 96308
2010-02-16 01:42:53 +00:00
Dale Johannesen
b410c3010b
Reapply 96294; now that I've gotten around to looking
...
at older buildbot messages, I see the failure predates
this patch.
llvm-svn: 96307
2010-02-16 01:27:47 +00:00
Bill Wendling
7734240a2a
Apply patch from http://llvm.org/bugs/attachment.cgi?id=4136 now that PR5004 is
...
finished.
llvm-svn: 96304
2010-02-16 00:58:02 +00:00
Dale Johannesen
df6f49fc2d
Something broke. Hard to believe it was this patch
...
but it's harder to believe it's the other candidate,
so reverting. Temporarily I hope.
llvm-svn: 96303
2010-02-16 00:43:58 +00:00
Dan Gohman
7d5c463d8e
When reusing an existing PHI node in a loop, be even more
...
strict about the requirements.
llvm-svn: 96301
2010-02-16 00:20:08 +00:00