Commit Graph

85510 Commits

Author SHA1 Message Date
Dale Johannesen d5c58b76ab Fix PR 7433. Silly typo in non-Darwin ARM tail call
handling, plus correct R9 handling in that mode.

llvm-svn: 106434
2010-06-21 18:21:49 +00:00
Eric Christopher bf572c7cea Add some codegen patterns for x86_64-linux-gnu tls codegen matching.
Based on a patch by Patrick Marlier!

llvm-svn: 106433
2010-06-21 18:21:27 +00:00
Jim Grosbach 97c8a6a928 early exit for dbg_value instructions
llvm-svn: 106430
2010-06-21 17:49:23 +00:00
Chris Lattner 74b5e3e0ae remove some dead variables reported by clang++
llvm-svn: 106428
2010-06-21 17:20:18 +00:00
Chris Lattner 93c4a7b33b make the Value constructor protected.
llvm-svn: 106427
2010-06-21 16:46:37 +00:00
Fariborz Jahanian cc99b3ca9e Fixes a corner case bug whereby declaring and defining an extern variable in a
particular sequence causes its definition to not be generated in the object file.
(fixes radar 8071804).

llvm-svn: 106424
2010-06-21 16:08:37 +00:00
Dan Gohman bbc29ea821 Revert r106422, which is breaking the non-fast-isel path.
llvm-svn: 106423
2010-06-21 16:02:28 +00:00
Dan Gohman f64fdd69d0 More changes for non-top-down fast-isel.
Split the code for materializing a value out of
SelectionDAGBuilder::getValue into a helper function, so that it can
be used in other ways. Add a new getNonRegisterValue function which
uses it, for use in code which doesn't want a CopyFromReg even
when FuncMap.ValueMap already has an entry for it.

llvm-svn: 106422
2010-06-21 15:13:54 +00:00
Kalle Raiskila df071b7e42 Add the check to the testcase of r106419.
llvm-svn: 106421
2010-06-21 15:11:51 +00:00
Kalle Raiskila 0ab5a02579 Mark the SPU 'lr' instruction to never have side effects.
This allows the fast regiser allocator to remove redundant 
register moves.
Update a set of tests that depend on the register allocator
to be linear scan. 

llvm-svn: 106420
2010-06-21 15:08:16 +00:00
Kalle Raiskila d7f50c118a Fix the lowering of VECTOR_SHUFFLE on SPU to handle splats.
llvm-svn: 106419
2010-06-21 14:42:19 +00:00
Benjamin Kramer 1e909fc0b6 Initialize member so GDBRemoteRegisterContext::ReadRegisterBytes doesn't rely on
an unitialized variable.

valgrind_errors -= 1;

llvm-svn: 106418
2010-06-21 14:39:40 +00:00
Benjamin Kramer ae39fc196b Return false from FileSpec::GetPath early instead of making the return value
dependent on the last byte of the buffer, which could be unitialized.

llvm-svn: 106417
2010-06-21 14:36:20 +00:00
Benjamin Kramer e1ce369628 Don't snprintf directly into a std::string, it's undefined behavior per C++03.
This also fixes a bug where we were trying to copy m_string into itself
via a format string. The pointer was invalidated by m_string.resize and
lldb (sometimes) crashed inside vsnprintf.

llvm-svn: 106416
2010-06-21 14:34:03 +00:00
Dan Gohman f91aff5f13 Do one lookup instead of two.
llvm-svn: 106415
2010-06-21 14:21:47 +00:00
Dan Gohman 7c58cf75fa Generalize this to look in the regular ValueMap in addition to
the LocalValueMap, to make it more flexible when fast-isel isn't
proceding straight top-down.

llvm-svn: 106414
2010-06-21 14:17:46 +00:00
Rafael Espindola 1cae86f704 Fix an unintentional commit. I think I typed "git svn dcommit" in the wrong branch.
I was trying to do some refactoring on the copyRegToReg, but this is realyl a work in progress and not generally useful yet.

llvm-svn: 106413
2010-06-21 13:31:32 +00:00
Argyrios Kyrtzidis a35c8e4092 Combine ClassTemplateDecl's PreviousDeclaration with CommonPtr, as in FunctionTemplateDecl.
llvm-svn: 106412
2010-06-21 10:57:41 +00:00
Kalle Raiskila 6f58190f6f Fix lowering of VECTOR_SHUFFLE on SPU. Old algorithm
used to choke llc with the attached test.
 

llvm-svn: 106411
2010-06-21 10:17:36 +00:00
Rafael Espindola 9d94ebf1b6 add_input_file and add_input_library now take const arguments, remove the
const_cast.

llvm-svn: 106410
2010-06-21 02:23:12 +00:00
Rafael Espindola 720f49ed86 Save more temps with -save-temps.
llvm-svn: 106409
2010-06-21 02:17:36 +00:00
Rafael Espindola c596baa56d wip
llvm-svn: 106408
2010-06-21 02:17:34 +00:00
Nate Begeman ed48c857dc Implement remaining codegen for NEON, all operations should now work.
llvm-svn: 106407
2010-06-20 23:05:28 +00:00
Nate Begeman 4713628816 Add support for returning multiple vectors via sret, which is how the ARM target expects the intrinsics to work.
llvm-svn: 106406
2010-06-20 21:09:52 +00:00
Nick Lewycky dcc7b6dcb6 Fix warning in no-asserts build.
llvm-svn: 106405
2010-06-20 20:27:42 +00:00
Argyrios Kyrtzidis 41d4562da2 Support PCH emitting/reading of using declarations.
llvm-svn: 106404
2010-06-20 14:40:59 +00:00
Benjamin Kramer 22a544bc82 Add braces to avoid an ambiguous else, fixing a GCC warning.
llvm-svn: 106403
2010-06-20 10:20:36 +00:00
Jordy Rose 895c899142 Adds analyzer support for idempotent and tautological binary operations such as "a*0" and "a+0". This is not very powerful, but does make the analyzer look a little smarter than it actually is.
llvm-svn: 106402
2010-06-20 04:56:29 +00:00
Jordy Rose 2dd9b02cc8 Casting to void* or any other pointer-to-sizeless type (e.g. function pointers) causes a divide-by-zero error. Simple fix: check if the pointee type size is 0 and bail out early if it is.
llvm-svn: 106401
2010-06-20 04:30:57 +00:00
Evan Cheng 884a8fe5fa Fix a crash caused by dereference of MBB.end(). rdar://8110842
llvm-svn: 106399
2010-06-20 00:54:38 +00:00
Dan Gohman c515ab1eb2 Restore a call to rememberInstruction which was accidentally dropped
in refactoring.

llvm-svn: 106398
2010-06-19 22:50:35 +00:00
Dan Gohman 32655906e4 Add a TODO comment.
llvm-svn: 106397
2010-06-19 21:30:18 +00:00
Dan Gohman 51d00092b6 Include the use kind along with the expression in the key of the
use sharing map. The reconcileNewOffset logic already forces a
separate use if the kinds differ, so incorporating the kind in the
key means we can track more sharing opportunities.

More sharing means fewer total uses to track, which means smaller
problem sizes, which means the conservative throttles don't kick
in as often.

llvm-svn: 106396
2010-06-19 21:29:59 +00:00
Dan Gohman 297fb8b9fc Don't include things in anonymous namespaces that don't need it.
llvm-svn: 106395
2010-06-19 21:21:39 +00:00
Argyrios Kyrtzidis e1224c8aba Cure for Doug's insomnia.
llvm-svn: 106394
2010-06-19 19:58:34 +00:00
Argyrios Kyrtzidis 26b72453f7 Include a hack to allow loading of templated CXXRecordDecls and test template reading from PCH.
llvm-svn: 106393
2010-06-19 19:29:21 +00:00
Argyrios Kyrtzidis 95c04caf92 Initial support for reading templates from PCH.
llvm-svn: 106392
2010-06-19 19:29:09 +00:00
Argyrios Kyrtzidis 106caf92cd Initial support for writing templates to PCH.
llvm-svn: 106391
2010-06-19 19:28:53 +00:00
Benjamin Kramer bf5c3d42ba Use calloc instead of new/memset, it is more efficient when the set is very large.
llvm-svn: 106390
2010-06-19 17:00:31 +00:00
Dan Gohman 866971ed3d Fix ScalarEvolution's "exhaustive" trip count evaluation code to avoid
assuming that loops are in canonical form, as ScalarEvolution doesn't
depend on LoopSimplify itself. Also, with indirectbr not all loops can
be simplified. This fixes PR7416.

llvm-svn: 106389
2010-06-19 14:17:24 +00:00
Dan Gohman d277246137 Factor out duplicated code for reusing and inserting casts into
a helper function.

llvm-svn: 106388
2010-06-19 13:25:23 +00:00
Anton Korobeynikov cc50b7d7d5 More AltiVec support.
Patch by Anton Yartsev!

llvm-svn: 106387
2010-06-19 09:47:18 +00:00
Chris Lattner 40ad0a2893 add a libs-only target to the clang makefile, patch by Sunay Ismail
in PR7397

llvm-svn: 106386
2010-06-19 06:35:25 +00:00
Eli Friedman c96b2496fc Fix for PR7415: refactor CodeGenModule::MayDeferGeneration and make it less
conservative for static variables in templated classes.

llvm-svn: 106385
2010-06-19 06:24:06 +00:00
Chris Lattner 87233f785b Fix PR7097, a bad interaction between -fno-use-cxa-atexit and
-mconstructor-aliases by using a WeakVH instead of a raw pointer.

llvm-svn: 106384
2010-06-19 05:52:45 +00:00
Bob Wilson 4581434c27 Tidy.
llvm-svn: 106383
2010-06-19 05:33:57 +00:00
Bob Wilson 6d12973143 Remove a fixme comment that is no longer relevant.
llvm-svn: 106382
2010-06-19 05:32:41 +00:00
Bob Wilson 0ae08935f6 Fix error message to match function name.
llvm-svn: 106381
2010-06-19 05:32:09 +00:00
Jim Ingham b01e742af7 Two changes in this checkin. Added a ThreadPlanKind so that I can do some reasoning based on the kind of thread plan
without having to use RTTI.
Removed the ThreadPlanContinue and replaced with a ShouldAutoContinue query that serves the same purpose.  Having to push
another plan to assert that if there's no other indication the target should continue when this plan is popped was flakey
and error prone.  This method is more stable, and fixed problems we were having with thread specific breakpoints.

llvm-svn: 106378
2010-06-19 04:45:32 +00:00
Jim Ingham b2a38a7286 Remember whether a queue or thread name were passed into "breakpoint modify" so we can recognize an empty argument as unsetting the option.
llvm-svn: 106377
2010-06-19 04:35:20 +00:00