Commit Graph

43618 Commits

Author SHA1 Message Date
John Criswell
de8c611c08 The fields for the stoppoint debug intrinsic have not changed, so update the
version number assertions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61257 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 19:56:36 +00:00
Bill Wendling
94920c123a This test works again for Darwin because a patch was reverted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61254 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 19:08:13 +00:00
Gordon Henriksen
95ca7314fd Add dyn_cast_or_null bindings for some additional classes missed in r61252.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61253 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 18:51:17 +00:00
Gordon Henriksen
2a9c671a51 C bindings for dyn_cast_or_null.
This operation can be used to build dyn_cast, isa, and cast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61252 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 18:39:45 +00:00
Chris Lattner
38e7721455 Add support for writing LLVM IR to a specified BitstreamWriter.
Patch by Lukasz Janyst!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61251 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 18:37:59 +00:00
Dan Gohman
018a34c576 Move the patterns which have i8 immediates before the patterns
that have i32 immediates so that they get selected first. This
currently only matters in the JIT, as assemblers will
automatically use the smallest encoding.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61250 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 18:25:21 +00:00
Dan Gohman
0b53d98c29 Use dyn_cast intead of isa + cast in the generated DAGISel code. This
reduces the amount of code slightly when assertions are enabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61249 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 18:13:39 +00:00
Evan Cheng
ab63152871 - CodeGenPrepare does not split loop back edges but it only knows about back edges of single block loops. It now does a DFS walk to find loop back edges.
- Use SplitBlockPredecessors to factor out common predecessors of the critical edge destination. This is disabled for now due to some regressions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61248 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 18:03:11 +00:00
Chris Lattner
a33649e98c Fix some release-assert warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61244 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 17:03:38 +00:00
Rafael Espindola
2f6fea90a5 Fix bug 3202.
The EH_frame and .eh symbols are now private, except for darwin9 and earlier.
The patch also fixes the definition of PrivateGlobalPrefix on pcc linux.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61242 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 10:55:56 +00:00
Nick Lewycky
d802be39d7 Update the .cvs files for nocapture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61241 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 09:41:54 +00:00
Nick Lewycky
73ddd4f00d Commit missed files from nocapture change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61240 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 09:38:31 +00:00
Nick Lewycky
f23d0d392a Resubmit support for the 'nocapture' attribute.
The problematic part of this patch is that we were out of attribute bits,
requiring some fancy bit hacking to make it fit (by shrinking alignment)
without breaking existing users or the file format.

This change will require users to rebuild llvm-gcc to match llvm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61239 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 06:39:12 +00:00
Bill Wendling
bebbded574 Perform this loop only when the -debug flag is specified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61238 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 02:09:57 +00:00
Dan Gohman
1385758215 Initialize the ImplicitDefed member, to avoid getting stale
data from a previous block.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61237 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 00:46:20 +00:00
Dan Gohman
5b200d8a13 Fix RegScavenger::forward() to work on basic blocks containing exactly
one instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61236 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 00:45:13 +00:00
Dan Gohman
9755faab60 Delete the RegScavenging constructor that takes a MachineBasicBlock
argument. Nothing was using it, and it set the MBB member without
calling enterBasicBlock, which was problematic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61234 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 00:34:32 +00:00
Mon P Wang
7538454f9f Fix test to account for generating some vector code for mul v2i64 instead
of incorrectly generating pmuldq


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61228 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 23:42:37 +00:00
Bill Wendling
e533f4e343 Didn't mean to commit this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61222 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 22:19:50 +00:00
Dan Gohman
a5b2fee757 Teach LowerSubregs to preserve kill/dead information when lowering
subreg instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61220 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 22:14:08 +00:00
Bill Wendling
82c19ae10a Re-XFAIL this test until debug stuff settles down.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61219 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 22:13:31 +00:00
Dan Gohman
98c206921a Make LowerSubregs' debug output for EXTRACT_SUBREG consistent with
that of INSERT_SUBREG and SUBREG_TO_REG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61218 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 22:11:34 +00:00
Dan Gohman
f04865f234 Fix a copy+pasto in an assertion message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61217 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 22:07:25 +00:00
Dan Gohman
07af765049 Fix indentation level.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61216 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 22:06:01 +00:00
Dan Gohman
bfd23c9961 When emitting instructions that define EFLAGS and the EFLAGS value isn't
used, mark the defs as dead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61215 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 22:03:42 +00:00
Dan Gohman
34d6ad73e1 When setting up the frame pointer, add it as a live-in register to all
non-entry blocks, so that it doesn't appear use-before-def anywhere.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61214 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 22:01:52 +00:00
Dan Gohman
2ccc839669 Print subreg information in MachineInstr::dump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61213 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 21:51:27 +00:00
Mon P Wang
af9b952627 Fixed x86 code generation of multiple for v2i64. It was incorrect for SSE4.1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61211 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 21:42:19 +00:00
Mon P Wang
1d045486ca Added some basic test cases for r61209
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61210 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 20:05:58 +00:00
Mon P Wang
87c8a8f304 Added support for vector widening.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61209 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 20:03:17 +00:00
Evan Cheng
5c9f34b7a0 Remove dead comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61201 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 09:01:18 +00:00
Nick Lewycky
19c2892677 Oops! Left out a line.
Simplifying the sdiv might allow further simplifications for our users.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61196 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 06:42:28 +00:00
Nick Lewycky
2a8f6597a3 Make all the vector elements positive in an srem of constant vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61195 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 06:31:11 +00:00
Chris Lattner
31535f1f04 Fix PR2929 by making bugpoint/code extract propagate the nothrow
bit from the original function to the cloned one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61194 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 05:52:56 +00:00
Mikhail Glushenkov
65ee1e6ff4 Fix typo in error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61191 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 04:06:58 +00:00
Nick Lewycky
78eb804068 Recommit this grammar fix that was backed out along with nocapture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61189 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 02:15:05 +00:00
Dan Gohman
7224170f6a Give MachineLICM a name, for -time-passes etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61184 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 01:37:56 +00:00
Dan Gohman
23b0d490cd Move post-RA scheduling before branch folding for now, because branch
folding's tail merging doesn't currently preserve liveness information
which post-RA scheduling requires.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61183 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 01:36:42 +00:00
Owen Anderson
2ebf63f8e2 Re-apply r61158 in a form that no longer breaks tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61182 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 01:27:19 +00:00
Dale Johannesen
a1d9cb1d46 Revert previous patch, appears to break bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61181 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 01:23:41 +00:00
Dan Gohman
a32b7ac86f Mark the x86 fp stack registers as "reserved". This tells LiveVariables
and the RegisterScavenger not to expect traditional liveness 
techniques are applicable to these registers, since we don't fully
modify the effects of push and pop after stackification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61179 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 01:05:09 +00:00
Dale Johannesen
12b882cf53 Fix the time regression I introduced in 464.h264ref with
my last patch to this file.

The issue there was that all uses of an IV inside a loop
are actually references to Base[IV*2], and there was one
use outside that was the same but LSR didn't see the base
or the scaling because it didn't recurse into uses outside
the loop; thus, it used base+IV*scale mode inside the loop
instead of pulling base out of the loop.  This was extra bad
because register pressure later forced both base and IV into
memory.  Doing that recursion, at least enough
to figure out addressing modes, is a good idea in general;
the change in AddUsersIfInteresting does this.  However,
there were side effects....

It is also possible for recursing outside the loop to
introduce another IV where there was only 1 before (if
the refs inside are not scaled and the ref outside is).
I don't think this is a common case, but it's in the testsuite.
It is right to be very aggressive about getting rid of
such introduced IVs (CheckForIVReuse and the handling of
nonzero RewriteFactor in StrengthReduceStridedIVUsers).
In the testcase in question the new IV produced this way
has both a nonconstant stride and a nonzero base, neither
of which was handled before.  (This patch does not handle 
all the cases where this can happen.)  And when inserting 
new code that feeds into a PHI, it's right to put such 
code at the original location rather than in the PHI's 
immediate predecessor(s) when the original location is outside 
the loop (a case that couldn't happen before)
(RewriteInstructionToUseNewBase); better to avoid making
multiple copies of it in this case.

Everything above is exercised in
CodeGen/X86/lsr-negative-stride.ll (and ifcvt4 in ARM which is
the same IR).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61178 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 00:57:22 +00:00
Chris Lattner
5f4f84ba3e reapply this hunk from Bill's reversion in r61169, it is conservative
and safe and orthogonal from turning off load pre.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61177 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 00:51:32 +00:00
Bill Wendling
a5d5c0268a XFAIL on Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61176 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 00:35:21 +00:00
Chris Lattner
24313e7aba make instnamer name unnamed blocks as well as instructions and args.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61175 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 00:33:11 +00:00
Bill Wendling
10ef02e2c8 Do not XFAIL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61174 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 00:27:15 +00:00
Bill Wendling
13d10096e1 Temporarily revert r61027. It was causing a bootstrap failure in "release" mode
with everyone's favorite error messages:

Comparing stages 2 and 3
warning: ./cc1-checksum.o differs
warning: ./cc1plus-checksum.o differs
Bootstrap comparison failure!
./c-decl.o differs
./cp/decl.o differs
./df-core.o differs
./gcc.o differs
./i386.o differs
./stor-layout.o differs
./tree-pretty-print.o differs
./tree.o differs
make[2]: *** [compare] Error 1
make[1]: *** [stage3-bubble] Error 2

See PR3227.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61169 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-17 23:31:20 +00:00
Devang Patel
3ac619e94f XFAIL for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61167 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-17 22:54:54 +00:00
Devang Patel
965c4156a9 Xfail these tests for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61166 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-17 22:53:09 +00:00
Devang Patel
854967effe Today the front-ends (llvm-gcc and clang) generate multiple llvm.dbg.compile_units to identify source file for various debug entities. Each llvm.dbg.compile_unit matches one file on the disk. However, the backend only supports one DW_TAG_compile_unit per .o file. The backend selects first compile_unit from the vector to construct DW_TAG_compile_unit entry, which is not correct in all cases.
First step to resolve this is, record file name and directory directly in debug info for various debug entities. 



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61164 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-17 22:39:29 +00:00