Commit Graph

61895 Commits

Author SHA1 Message Date
Torok Edwin 24c7835d19 Call doInitialization(), releaseMemory(), and doFinalization() for on-the-fly passes as well.
Also don't call finalizers for LoopPass if initialization was not called.
Add a unittest that tests that these methods are called, in the proper
order, and the correct number of times.

llvm-svn: 74438
2009-06-29 18:49:09 +00:00
Dan Gohman e00beaaee8 Simplify this code, and avoid using APInt(). This fixes
(otherwise harmless) uninitialized value warnings that
Duncan found with gcc-4.4.

llvm-svn: 74437
2009-06-29 18:25:52 +00:00
Owen Anderson 45c299ef65 Add a target-specific DAG combine on X86 to fold the common pattern of
fence-atomic-fence down to just the atomic op.  This is possible thanks to
X86's relatively strong memory model, which guarantees that locked instructions
(which are used to implement atomics) are implicit fences.

llvm-svn: 74435
2009-06-29 18:04:45 +00:00
Argyrios Kyrtzidis 743e7db794 -Keep a reference to the ASTContext inside the TranslationUnitDecl.
-Introduce Decl::getASTContext() which returns the reference from the TranslationUnitDecl that it is contained in.

The general idea is that Decls can point to their own ASTContext so that it is no longer required to "manually" keep track and make sure that you pass the correct ASTContext to Decls' methods, e.g. methods like Decl::getAttrs should eventually not require a ASTContext parameter.

llvm-svn: 74434
2009-06-29 17:38:40 +00:00
Argyrios Kyrtzidis 3cfb28a68d Remove redundant leftover code.
llvm-svn: 74433
2009-06-29 17:38:09 +00:00
Chris Lattner e4edb8e818 Fix the FloatingLiteral API to take the isexact flag by value instead of
by pointer.

llvm-svn: 74432
2009-06-29 17:34:55 +00:00
Douglas Gregor 70d83e27a4 Move FunctionDecl::TemplateSpecializationInfo out into its own class,
FunctionTemplateSpecializationInfo, in DeclTemplate.h. No functionality change.

llvm-svn: 74431
2009-06-29 17:30:29 +00:00
Sebastian Redl 1257581438 Fix three MSVC 2008 warnings that completely clutter the build output.
llvm-svn: 74430
2009-06-29 17:12:06 +00:00
David Greene 46b56ffae3 Add processor descriptions for Istanbul and Shanghai.
llvm-svn: 74429
2009-06-29 16:54:06 +00:00
David Greene a4b8998fbb Fix a subtarget feature bug.
llvm-svn: 74428
2009-06-29 16:51:01 +00:00
David Greene f92ba97cda Add more vector ValueTypes for AVX and other extended vector instruction
sets.

llvm-svn: 74427
2009-06-29 16:47:10 +00:00
Douglas Gregor e081d90233 Fix CMake checks for pthread_getspecific and pthread_rwlock_init, from Xerxes Ranby
llvm-svn: 74426
2009-06-29 16:25:22 +00:00
Steve Naroff 8d9cc9ebc1 Remove ASTContext::getObjCQualifiedIdType().
Convert clients to use ASTContext::getObjCObjectPointerType().

llvm-svn: 74424
2009-06-29 16:22:52 +00:00
David Goodwin dbf11ba800 Rename ARMcmpNZ to ARMcmpZ and use it to represent comparisons that set only the Z flag (i.e. eq and ne). Make ARMcmpZ commutative.
llvm-svn: 74423
2009-06-29 15:33:01 +00:00
Duncan Sands 14814d4477 Add triple for OpenBSD.
llvm-svn: 74422
2009-06-29 13:36:13 +00:00
Duncan Sands 24a3724b04 Include the new file ThumbRegisterInfo.cpp to CMakeLists.txt
to make sure ThumbRegisterInfo.cpp are compiled and linked in.
Patch by Xerxes.

llvm-svn: 74421
2009-06-29 13:11:32 +00:00
Evan Cheng b23b50d54d Implement Thumb2 ldr.
After much back and forth, I decided to deviate from ARM design and split LDR into 4 instructions (r + imm12, r + imm8, r + r << imm12, constantpool). The advantage of this is 1) it follows the latest ARM technical manual, and 2) makes it easier to reduce the width of the instruction later. The down side is this creates more inconsistency between the two sub-targets. We should split ARM LDR instruction in a similar fashion later. I've added a README entry for this.

llvm-svn: 74420
2009-06-29 07:51:04 +00:00
Zhongxing Xu 4744d560b8 Invalidate the alloca region by setting its default value to conjured symbol.
llvm-svn: 74419
2009-06-29 06:43:40 +00:00
Zhongxing Xu 25d710ee50 The default answer for isBoundable() should be false.
llvm-svn: 74418
2009-06-29 05:44:14 +00:00
Mikhail Glushenkov 72f3f7eb56 Make dynamic LLVMC plugins work on Windows (finally!).
Implemented by making lib/CompilerDriver a shared library that holds all the
global static data (CommandLine options, plugin registry) that we unfortunately
have to live with.

llvm-svn: 74417
2009-06-29 03:09:15 +00:00
Andreas Bolka 3a09c8bd5e Missed one.
llvm-svn: 74416
2009-06-29 00:53:49 +00:00
Andreas Bolka c5558a83f4 Fix case in LDA util function names.
llvm-svn: 74415
2009-06-29 00:50:26 +00:00
Bill Wendling 1835107ed0 Make the StackProtector bitfield use enums instead of obscure numbers.
llvm-svn: 74414
2009-06-28 23:01:01 +00:00
Anders Carlsson b012ca92ac Move the check for vprintf* functions inside of SemaCheckStringLiteral. Fixes PR4470.
llvm-svn: 74413
2009-06-28 19:55:58 +00:00
Chris Lattner 877a48e67a make these tests pass with the stack canary stuff even on targets where they default to on.
llvm-svn: 74412
2009-06-28 19:49:49 +00:00
Nate Begeman 886448d694 Fix incorrect AST's being produced, noticed by Eli.
The issue this was working around is no longer present in TOT clang.

llvm-svn: 74411
2009-06-28 19:12:57 +00:00
Zhongxing Xu 55e070031f Now this test case passes.
llvm-svn: 74410
2009-06-28 14:25:10 +00:00
Zhongxing Xu 0628f539a8 Adjust retrieve handler priority. If a field is of array type, it should be
handled by RetrieveArray().

llvm-svn: 74409
2009-06-28 14:16:39 +00:00
Zhongxing Xu 6f610707cf Invalidate a field of struct type by setting its default value to conjured
symbol.

llvm-svn: 74408
2009-06-28 13:59:24 +00:00
Zhongxing Xu d260db1238 Do not crash on binding concrete integer location.
llvm-svn: 74407
2009-06-28 10:16:11 +00:00
Zhongxing Xu f7a6de3a12 Simplify some code. As in region store, we always expect the location is a
memregion.

llvm-svn: 74406
2009-06-28 09:26:15 +00:00
Bill Wendling d63bbadbef Add stack protector support to clang. This generates the 'ssp' and 'sspreq'
function attributes. There are predefined macros that are defined when stack
protectors are used: __SSP__=1 with -fstack-protector and __SSP_ALL__=2 with
-fstack-protector-all.

llvm-svn: 74405
2009-06-28 07:36:13 +00:00
Nate Begeman bd956c4290 OpenCL 1.0 support:
Handle rules for ExtVector + ExtVector and ExtVector + Scalar operations. 
Fix problem Eli noticed where we were allowing pointer types to be splatted to
vector elements.

llvm-svn: 74404
2009-06-28 02:36:38 +00:00
Andreas Bolka 9d09e20142 Print pairwise dependence results, add testcases.
llvm-svn: 74402
2009-06-28 00:35:22 +00:00
Andreas Bolka 9fee7f86ad Minimal LDA interface, maximally conservative tester.
llvm-svn: 74401
2009-06-28 00:21:21 +00:00
Andreas Bolka 8976d3bc7e LDA analysis output scaffolding.
llvm-svn: 74400
2009-06-28 00:16:08 +00:00
Dan Gohman 317f054531 Don't try to split a loop when the controlling icmp instruction
doesn't have an IV-based operand. This fixes PR4471.

llvm-svn: 74399
2009-06-27 22:58:27 +00:00
Dan Gohman ffdcba3dbd Remove the block from the LoopInfo, rather than just the Loop.
LoopInfo will handle removing it from the Loop, as well as updating
its own tables.

llvm-svn: 74398
2009-06-27 22:32:36 +00:00
Nate Begeman c8961a424d Implement feedback from Eli re: the purpose of lax vector conversions
llvm-svn: 74397
2009-06-27 22:05:55 +00:00
Dan Gohman c8ca49659a Teach LoopSimplify how to merge multiple loop exits into a single exit,
when one of them can be converted to a trivial icmp and conditional
branch.

This addresses what is essentially a phase ordering problem.
SimplifyCFG knows how to do this transformation, but it doesn't do so
if the primary block has any instructions in it other than an icmp and
a branch. In the given testcase, the block contains other instructions,
however they are loop-invariant and can be hoisted. SimplifyCFG doesn't
have LoopInfo though, so it can't hoist them. And, it's important that
the blocks be merged before LoopRotation, as it doesn't support
multiple-exit loops.

llvm-svn: 74396
2009-06-27 21:30:38 +00:00
Dan Gohman 8918b481bf More minor code simplifications.
llvm-svn: 74395
2009-06-27 21:23:40 +00:00
Dan Gohman 4f16a2923c Eliminate a layer of indirection in LoopInfo and MachineLoopInfo.
llvm-svn: 74394
2009-06-27 21:22:48 +00:00
Dan Gohman c5c85c0fec Convert ScalarEvolution to use BumpPtrAllocator and FoldingSet, instead
of a team of individual allocations and a team of std::maps.

llvm-svn: 74393
2009-06-27 21:21:31 +00:00
Dan Gohman 7ed0bb3b7c Remove a redundant #include.
llvm-svn: 74392
2009-06-27 21:18:51 +00:00
Dan Gohman 830fd38d9b Change SCEVExpander to use an IRBuilder to emit instructions.
llvm-svn: 74391
2009-06-27 21:18:18 +00:00
Douglas Gregor 15448f8d23 Improve support for overloaded operator templates.
llvm-svn: 74390
2009-06-27 21:05:07 +00:00
Dan Gohman 3a4be9df4a Add a 'const' in a comment.
llvm-svn: 74389
2009-06-27 20:53:16 +00:00
Eli Friedman 5e774b1333 Fix the parser error hanlding for __builtin_offsetof to actually print
out an error for a malformed __builtin_offsetof.

llvm-svn: 74388
2009-06-27 20:38:33 +00:00
Douglas Gregor 0799d916e1 Add a Last Updated field to the C++ status page
llvm-svn: 74387
2009-06-27 19:33:58 +00:00
Fariborz Jahanian 3fe6b61b23 Renamed MarcDestructorReferenced -> MarkDestructorReferenced
llvm-svn: 74386
2009-06-27 15:05:11 +00:00