Commit Graph

51654 Commits

Author SHA1 Message Date
Dan Gohman 650b1e7ff8 Use ~0u instead of -1u as the special value, to hopefully avoid
warnings on compilers that warn about such things.

llvm-svn: 61263
2008-12-19 22:23:43 +00:00
Anders Carlsson 6736d1a2bb Get rid of the old Expr::Evaluate variant.
llvm-svn: 61260
2008-12-19 20:58:05 +00:00
Evan Cheng 0869f78555 Fix PR3149. If an early clobber def is a physical register and it is tied to an input operand, it effectively extends the live range of the physical register. Currently we do not have a good way to represent this.
172     %ECX<def> = MOV32rr %reg1039<kill>
180     INLINEASM <es:subl $5,$1
        sbbl $3,$0>, 10, %EAX<def>, 14, %ECX<earlyclobber,def>, 9, %EAX<kill>,
36, <fi#0>, 1, %reg0, 0, 9, %ECX<kill>, 36, <fi#1>, 1, %reg0, 0
188     %EAX<def> = MOV32rr %EAX<kill>
196     %ECX<def> = MOV32rr %ECX<kill>
204     %ECX<def> = MOV32rr %ECX<kill>
212     %EAX<def> = MOV32rr %EAX<kill>
220     %EAX<def> = MOV32rr %EAX
228     %reg1039<def> = MOV32rr %ECX<kill>

The early clobber operand ties ECX input to the ECX def.

The live interval of ECX is represented as this:
%reg20,inf = [46,47:1)[174,230:0)  0@174-(230) 1@46-(47)

The right way to represent this is something like
%reg20,inf = [46,47:2)[174,182:1)[181:230:0)  0@174-(182) 1@181-230 @2@46-(47)

Of course that won't work since that means overlapping live ranges defined by two val#.

The workaround for now is to add a bit to val# which says the val# is redefined by a early clobber def somewhere. This prevents the move at 228 from being optimized away by SimpleRegisterCoalescing::AdjustCopiesBackFrom.

llvm-svn: 61259
2008-12-19 20:58:01 +00:00
Anders Carlsson 091134785d Pass -fblocks to clang
llvm-svn: 61258
2008-12-19 20:56:23 +00:00
John Criswell 8dd90a7245 The fields for the stoppoint debug intrinsic have not changed, so update the
version number assertions.

llvm-svn: 61257
2008-12-19 19:56:36 +00:00
Douglas Gregor 6ab9978b66 Add a missing @end. Why didn't this get diagnosed?
llvm-svn: 61256
2008-12-19 19:16:37 +00:00
Douglas Gregor a119f10482 Support more implicit conversions for Objective-C types. Addresses <rdar://problem/6458293>.
llvm-svn: 61255
2008-12-19 19:13:09 +00:00
Bill Wendling dc2b987abb This test works again for Darwin because a patch was reverted.
llvm-svn: 61254
2008-12-19 19:08:13 +00:00
Gordon Henriksen 05a868f7af Add dyn_cast_or_null bindings for some additional classes missed in r61252.
llvm-svn: 61253
2008-12-19 18:51:17 +00:00
Gordon Henriksen 29e3894e7d C bindings for dyn_cast_or_null.
This operation can be used to build dyn_cast, isa, and cast.

llvm-svn: 61252
2008-12-19 18:39:45 +00:00
Chris Lattner af4c0bf44f Add support for writing LLVM IR to a specified BitstreamWriter.
Patch by Lukasz Janyst!

llvm-svn: 61251
2008-12-19 18:37:59 +00:00
Dan Gohman b289d4163b 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.

llvm-svn: 61250
2008-12-19 18:25:21 +00:00
Dan Gohman f1fb65c747 Use dyn_cast intead of isa + cast in the generated DAGISel code. This
reduces the amount of code slightly when assertions are enabled.

llvm-svn: 61249
2008-12-19 18:13:39 +00:00
Evan Cheng 3b3de7c228 - 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.

llvm-svn: 61248
2008-12-19 18:03:11 +00:00
Fariborz Jahanian 8c036a3af4 Test case for my last @encode patch.
llvm-svn: 61247
2008-12-19 17:45:06 +00:00
Douglas Gregor 47d3f2742a Allow downcasts of pointers to Objective-C interfaces, with a
warning. This matches GCC's behavior and addresses
<rdar://problem/6458293>.

llvm-svn: 61246
2008-12-19 17:40:08 +00:00
Anders Carlsson 324de7ba46 Fix for PR3234
llvm-svn: 61245
2008-12-19 17:27:57 +00:00
Chris Lattner 9c148c8fc2 Fix some release-assert warnings
llvm-svn: 61244
2008-12-19 17:03:38 +00:00
Rafael Espindola 770b4b830a 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.

llvm-svn: 61242
2008-12-19 10:55:56 +00:00
Nick Lewycky 3cde35175c Update the .cvs files for nocapture.
llvm-svn: 61241
2008-12-19 09:41:54 +00:00
Nick Lewycky 8d69f48833 Commit missed files from nocapture change.
llvm-svn: 61240
2008-12-19 09:38:31 +00:00
Nick Lewycky 2abb108f1b 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.

llvm-svn: 61239
2008-12-19 06:39:12 +00:00
Bill Wendling 19a54ffc7f Perform this loop only when the -debug flag is specified.
llvm-svn: 61238
2008-12-19 02:09:57 +00:00
Dan Gohman 8c82a8a984 Initialize the ImplicitDefed member, to avoid getting stale
data from a previous block.

llvm-svn: 61237
2008-12-19 00:46:20 +00:00
Dan Gohman b4c55bb857 Fix RegScavenger::forward() to work on basic blocks containing exactly
one instruction.

llvm-svn: 61236
2008-12-19 00:45:13 +00:00
Dan Gohman 4293cea3e5 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.

llvm-svn: 61234
2008-12-19 00:34:32 +00:00
Ted Kremenek dde7df9de2 Updated checker build.
llvm-svn: 61233
2008-12-19 00:19:19 +00:00
Fariborz Jahanian 781c5c879c Several@encode bug fixes for ObjC.
llvm-svn: 61231
2008-12-19 00:14:49 +00:00
Ted Kremenek 4e15d97ae4 Update Xcode project.
llvm-svn: 61230
2008-12-19 00:03:48 +00:00
Douglas Gregor 1e57a3fb46 Add some more implicit conversions for Objective-C++
llvm-svn: 61229
2008-12-18 23:43:31 +00:00
Mon P Wang 308a1acaaf Fix test to account for generating some vector code for mul v2i64 instead
of incorrectly generating pmuldq

llvm-svn: 61228
2008-12-18 23:42:37 +00:00
Ted Kremenek 021752ab4e Added test case for suppressing leak warnings for reference-counted objects passed by-reference to an unknown function.
llvm-svn: 61227
2008-12-18 23:40:58 +00:00
Ted Kremenek 5b26c11f56 Fix regression when invalidating reference-counts for objects passed-by-reference to a function/method.
llvm-svn: 61224
2008-12-18 23:34:57 +00:00
Steve Naroff 1ef21279b6 Don't define __STDC__ when compiling with -fms-extensions
llvm-svn: 61223
2008-12-18 22:37:25 +00:00
Bill Wendling 070de29fcf Didn't mean to commit this.
llvm-svn: 61222
2008-12-18 22:19:50 +00:00
Dan Gohman 9abd04bf3f Teach LowerSubregs to preserve kill/dead information when lowering
subreg instructions.

llvm-svn: 61220
2008-12-18 22:14:08 +00:00
Bill Wendling 4c13e77d49 Re-XFAIL this test until debug stuff settles down.
llvm-svn: 61219
2008-12-18 22:13:31 +00:00
Dan Gohman c4ce336205 Make LowerSubregs' debug output for EXTRACT_SUBREG consistent with
that of INSERT_SUBREG and SUBREG_TO_REG.

llvm-svn: 61218
2008-12-18 22:11:34 +00:00
Dan Gohman d38c00c85b Fix a copy+pasto in an assertion message.
llvm-svn: 61217
2008-12-18 22:07:25 +00:00
Dan Gohman 451afdd9fe Fix indentation level.
llvm-svn: 61216
2008-12-18 22:06:01 +00:00
Dan Gohman 69cd963b9a When emitting instructions that define EFLAGS and the EFLAGS value isn't
used, mark the defs as dead.

llvm-svn: 61215
2008-12-18 22:03:42 +00:00
Dan Gohman 975f78ae79 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.

llvm-svn: 61214
2008-12-18 22:01:52 +00:00
Dan Gohman 0ab1144c79 Print subreg information in MachineInstr::dump.
llvm-svn: 61213
2008-12-18 21:51:27 +00:00
Douglas Gregor b04675d112 Don't check initializers when there are dependent types or type-dependent expressions involved
llvm-svn: 61212
2008-12-18 21:49:58 +00:00
Mon P Wang 998fd29ce1 Fixed x86 code generation of multiple for v2i64. It was incorrect for SSE4.1.
llvm-svn: 61211
2008-12-18 21:42:19 +00:00
Mon P Wang 6e5f4bc1e7 Added some basic test cases for r61209
llvm-svn: 61210
2008-12-18 20:05:58 +00:00
Mon P Wang a501640ffa Added support for vector widening.
llvm-svn: 61209
2008-12-18 20:03:17 +00:00
Douglas Gregor 55ad91fecb Ultrasimplistic sketch for the parsing of C++ template-ids. This won't
become useful or correct until we (1) parse template arguments
correctly, (2) have some way to turn template-ids into types,
declarators, etc., and (3) have a real representation of templates.

llvm-svn: 61208
2008-12-18 19:37:40 +00:00
Ted Kremenek 9443f0ea5e Use '&' to test StartOfLine flag.
llvm-svn: 61205
2008-12-18 18:15:29 +00:00
Fariborz Jahanian f8f0c6b1bc Removed a slot in ObjCMemRegExpr used in
code gen which did not belong there.

llvm-svn: 61203
2008-12-18 17:29:46 +00:00