Commit Graph

9627 Commits

Author SHA1 Message Date
Dan Gohman
f0757b0edc Add more const qualifiers on TargetMachine and friends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101977 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-21 01:34:56 +00:00
Dan Gohman
af5097537c Update CMakeLists.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101976 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-21 01:32:29 +00:00
Dan Gohman
5eb6d65a27 Move several SelectionDAG-independent utility functions out of the
SelectionDAG directory and into a new Analysis.cpp file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101975 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-21 01:22:34 +00:00
Evan Cheng
30fdb5c2ac - Clean up some crappy code which deals with coalescing of copies which look at
extract_subreg / insert_subreg, etc.
- Add support for more aggressive insert_subreg coalescing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101971 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-21 00:44:22 +00:00
Evan Cheng
3115698611 Rewrite machine cse to avoid recursion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101964 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-21 00:21:07 +00:00
Dan Gohman
bc7588eb68 Add another variant of this test which found a place where
CodeGen's ComputeMaskedBits was being over-conservative when computing
bits for an ADD.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101963 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-21 00:19:28 +00:00
Dale Johannesen
7609017dc3 Because of the EMMS problem, right now we have to support
user-defined operations that use MMX register types, but
the compiler shouldn't generate them on its own.  This adds
a Synthesizable abstraction to represent this, and changes
the vector widening computation so it won't produce MMX types.
(The motivation is to remove noise from the ABI compatibility
part of the gcc test suite, which has some breakage right now.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101951 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 22:34:09 +00:00
Jakob Stoklund Olesen
9196ab6405 When MachineLICM is hoisting a physical register after regalloc, make sure the
register is not killed in the loop.

This fixes 188.ammp on ARM where the post-ra scheduler would grab a register
that looked available but wasn't.

A testcase would be huge and fragile, sorry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101930 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 18:45:47 +00:00
Evan Cheng
d6060a4ce9 Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101914 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 17:27:38 +00:00
Dan Gohman
92884f7ee5 Sink the CopyToExportRegsIfNeeded calls out of SelectionDAGISel
into SelectionDAGBuilder. This avoids a separate pass over the
instructions, and has the side effect of providing debug location
information to the copy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101906 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 15:03:56 +00:00
Dan Gohman
ba5be5c07b Don't send PHI nodes down to SelectionDAGBuilder of FastISel, since
they end up doing nothing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101904 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 15:00:41 +00:00
Dan Gohman
d84e806dd4 Sink this use_empty() check into isUsedOutsideOfDefiningBlock.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101902 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 14:50:13 +00:00
Dan Gohman
c025c85352 If a PHI node somehow has debug info, propogate it to the MachineInstr PHI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101901 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 14:48:02 +00:00
Dan Gohman
3f1403f14e Don't iterate through the whole block just to find the PHI nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101900 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 14:46:25 +00:00
Gabor Greif
a9b2313c13 use abstract accessors to CallInst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101899 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 13:13:04 +00:00
Chris Lattner
44e05080f8 Bill's change in r95336 broke empty aggregates embedded
in other types.  fix this by only bumping zero-byte globals
up to a single byte if the *entire global* is zero size,
fixing PR6340.

This also fixes empty arrays etc to be handled correctly,
and only does this on subsection-via-symbols targets (aka
darwin) which is the only place where this matters.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101879 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 06:20:21 +00:00
Dan Gohman
8b1dbebc1e Delete a redundant return statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101860 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 01:58:20 +00:00
Bill Wendling
86c5abb4c0 The visitXOR method can return the same SDNode. If so, we don't want to delete
it as it's not dead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101855 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 01:25:01 +00:00
Dan Gohman
a9056dbec1 Remove this debug output; it isn't that useful, and it's incomplete
in the case where a basic block is split.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101850 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 00:56:44 +00:00
Dan Gohman
8ba3aa7f9c Sink DebugLoc handling out of SelectionDAGISel into FastISel and
SelectionDAGBuilder, where it doesn't have to be as complicated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101848 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 00:48:35 +00:00
Dan Gohman
084751cd16 Remove MachineFunction's DefaultDebugLoc member, and make DwarfDebug.cpp
responsible for figuring out what that's supposed to be on its own.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101844 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 00:37:27 +00:00
Dan Gohman
a9a3321938 Reapply the removal of SelectionDAGISel's BB, with a fix for the case
where multiple blocks are emitted; functions which do this need to return
the new BB so that their callers can stay current.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101843 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 00:29:35 +00:00
Dan Gohman
68b7960c1a Revert 101825, which is causing trouble.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101832 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 23:34:15 +00:00
Dan Gohman
66db3a0f10 Make BreakAntiDependencies' SUnits argument const, and make the Begin
and End arguments by-value rather than by-reference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101830 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 23:11:58 +00:00
Dan Gohman
35bb85b7ee Eliminate SelectionDAGISel's "current block" member. Just pass it as
an argument to things that need it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101825 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 22:51:14 +00:00
Dan Gohman
99be8ae389 Eliminate the CurMBB member from SelectionDAGBuilder. For places that
need it, just pass around the parent block of the current instruction
explicitly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101822 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 22:41:47 +00:00
Evan Cheng
4c26e93e89 More progress on promoting i16 operations to i32 for x86. Work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101808 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 19:29:22 +00:00
Dan Gohman
50d2b1ac02 Give SelectionDAG a TargetMachine too, rather than having it
fetch one from the MachineFunction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101807 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 19:22:07 +00:00
Evan Cheng
285fb1cc4a More 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101806 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 19:17:44 +00:00
Devang Patel
2a4a3b7c61 Add DW_AT_APPLE_omit_frame_ptr to encode -fomit-frame-pointer flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101805 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 19:14:02 +00:00
Dan Gohman
55e59c1863 Code that needs a TargetMachine should have access to one directly, rather
than just getting one through a TargetLowering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101802 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 19:05:59 +00:00
Dan Gohman
46007b3712 Move isInTailCallPosition out of SelectionDAGBuilder, as it isn't
SelectionDAG-specific.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101801 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 18:41:46 +00:00
Dan Gohman
3fb150a902 Fix -Wcast-qual warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101655 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 17:42:52 +00:00
Dan Gohman
0d805c33d1 Add const qualifiers to TargetLoweringObjectFile usage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101640 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 16:44:48 +00:00
Dan Gohman
82d5eaf23e Use const_cast instead of a C-style cast to cast away const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101639 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 16:43:55 +00:00
Dan Gohman
9f23dee08c Start function numbering at 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101638 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 16:29:15 +00:00
Dan Gohman
383b5f6b91 Delete now-unnecessary const_casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101637 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 15:32:28 +00:00
Dan Gohman
d858e90f03 Use const qualifiers with TargetLowering. This eliminates several
const_casts, and it reinforces the design of the Target classes being
immutable.

SelectionDAGISel::IsLegalToFold is now a static member function, because
PIC16 uses it in an unconventional way. There is more room for API
cleanup here.

And PIC16's AsmPrinter no longer uses TargetLowering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101635 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 15:26:15 +00:00
Evan Cheng
94d1d9c219 Postra machine licm must add registers defined by loop invariants to *all* of
the live-in sets of BBs in the loop. Otherwise later pass may end up using the
registers and override the invariant. rdar://7852937
No reasonablly sized test case possible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101626 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 07:07:11 +00:00
Evan Cheng
f2b910922d Fix codegen passes. -disable-ssc shouldn't disable postra machine licm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101622 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 06:47:47 +00:00
Evan Cheng
e5b51ac770 More work to allow dag combiner to promote 16-bit ops to 32-bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101621 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 06:13:15 +00:00
Evan Cheng
4ff28527bb Another 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101620 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 06:12:32 +00:00
Bob Wilson
8295d4c96c As a temporary workaround for post-RA not handling DebugValue instructions,
just remove them all.  Radar 7873207 (working around the root problem of
Radar 7759363).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101604 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 00:49:11 +00:00
Jakob Stoklund Olesen
23eaf26fa3 Revert "Use a simpler data structure to calculate the least recently used register in RegAllocLocal."
This reverts commit 101392. It broke a buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101595 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 00:38:36 +00:00
Eric Christopher
551754c495 Revert 101465, it broke internal OpenGL testing.
Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101579 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-16 23:37:20 +00:00
Devang Patel
f2548caaa8 Add support to emit dwarf ranges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101575 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-16 23:33:45 +00:00
Jakob Stoklund Olesen
cf7fbd41be Use a simpler data structure to calculate the least recently used register in RegAllocLocal.
This makes the local register allocator about 20% faster.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101574 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-16 23:32:37 +00:00
Evan Cheng
003d7c4b5d (i32 sext_in_reg (i32 aext (i16 x)), i16) -> (i32 sext x). No known test case until -promote-16bit is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101551 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-16 22:26:19 +00:00
Dan Gohman
8c0e89925d Create a new TargetSelectionDAGInfo class. This will eventually acquire
SelectionDAG-specific parts of TargetLowering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101537 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-16 21:12:11 +00:00
Dan Gohman
4bcf0a9233 Commit this, which should have accompanied 101531.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101532 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-16 20:22:43 +00:00