Commit Graph

47310 Commits

Author SHA1 Message Date
Devang Patel ca9d93e627 Read and write function notes.
llvm-svn: 55657
2008-09-02 21:47:13 +00:00
Devang Patel 805b37ca43 Use bitwise AND.
llvm-svn: 55656
2008-09-02 21:46:44 +00:00
Ted Kremenek ceb3ca94b7 When creating CXXRecordDecls and RecordDecls within ActOnTag, hook up the new [CXX]RecordDecl with the RecordDecl chain.
llvm-svn: 55652
2008-09-02 21:26:19 +00:00
Dale Johannesen 1a83a9973b New testcase for targets without 64-bit atomics;
xfail old test for ppc.

llvm-svn: 55651
2008-09-02 21:19:30 +00:00
Ted Kremenek 52baf50f62 RecordDecl:
- Remove method 'isForwardDecl'; this functionality is already provided by
  'isDefinition()'
- Move method definitions to be co-located with other RecordDecl methods.

llvm-svn: 55649
2008-09-02 21:12:32 +00:00
Devang Patel cc4d6ce532 Function notes tests.
llvm-svn: 55648
2008-09-02 20:58:16 +00:00
Devang Patel 600879c8e8 Print function notes.
llvm-svn: 55647
2008-09-02 20:56:33 +00:00
Devang Patel c57b7a0fc8 Parse function notes.
llvm-svn: 55646
2008-09-02 20:52:40 +00:00
Devang Patel d334a43a86 Initialize function notes.
llvm-svn: 55645
2008-09-02 20:51:15 +00:00
Ted Kremenek 478f6baf0d RecordDecl serialization:
- Don't serialize out the NextDeclarator field.  It is unused and deprecated.
- Serialize out the NextDecl pointer.

llvm-svn: 55644
2008-09-02 20:42:52 +00:00
Dale Johannesen bc69829b22 Fix some bugs in the code sequences for atomics.
llvm-svn: 55643
2008-09-02 20:30:23 +00:00
Ted Kremenek 318d78f50b RecordDecl:
- Added method 'isForwardDeclaration', a predicate method that returns true
  if a RecordDecl represents a forward declaration.
- Added method 'getDefinitionDecl', a query method that returns a pointer to
  the RecordDecl that provides the actual definition of a struct/union.

llvm-svn: 55642
2008-09-02 20:25:22 +00:00
Dan Gohman 115267fdc6 Ensure that HandlePHINodesInSuccessorBlocks is run for all blocks,
even in FastISel mode in the case where FastISel successfully 
selects all the instructions. 

llvm-svn: 55641
2008-09-02 20:17:56 +00:00
Ted Kremenek 123f025b29 CXXRecordDecl and RecordDecl:
- Change constructor and create methods to accept a CXXRecordDecl* (RecordDecl*)
  instead of a ScopedDecl* for PrevDecl.  This causes the type checking
  to be more tight and doesn't break any code.
  
RecordDecl:

- Don't use the NextDeclarator field in ScopedDecl to represent the previous
  declaration. This is a conflated use of the NextDeclarator field, which will
  be removed anyway when DeclGroups are fully implemented.

- Instead, represent (a soon to be implemented) chain of RecordDecls using a
  NextDecl field.  The last RecordDecl in the chain is always the 'defining'
  RecordDecl that owns the FieldDecls.  The other RecordDecls in the chain
  are forward declarations.

llvm-svn: 55640
2008-09-02 20:13:32 +00:00
Steve Naroff c84e8b779e - Implement __block.
- Replace FIXME in Preprocessor::HandleIdentifier() with a check that avoids diagnosing extension tokens that originate from macro definitions.

llvm-svn: 55639
2008-09-02 18:50:17 +00:00
Devang Patel 9989ddeb15 Getter and setter for function notes.
llvm-svn: 55638
2008-09-02 18:33:55 +00:00
Steve Naroff d450bffcf1 Pull code from last commit. will put back soon.
llvm-svn: 55637
2008-09-02 18:04:36 +00:00
Daniel Dunbar 61e0a821cc Reapply majority of r55557 but with the changes to compilation flags
disabled until issues with gcc 4.1 on linux 32-bit are resolved.

llvm-svn: 55636
2008-09-02 17:35:16 +00:00
Steve Naroff 95bffc74da Implement block pseudo-storage class modifiers (__block, __byref).
llvm-svn: 55635
2008-09-02 15:20:19 +00:00
Nuno Lopes 114a582019 plug memleak: destroy internal buffer
llvm-svn: 55632
2008-09-02 12:06:08 +00:00
Nuno Lopes 99341f2d9d plug a little memleak in verifyFunction()
# first commit to llvm, so whatch out :)

llvm-svn: 55631
2008-09-02 11:30:10 +00:00
Nuno Lopes d63db4063a recognise .s/.S file extensions. add default value for CCC_LANGUAGES
llvm-svn: 55630
2008-09-02 10:27:37 +00:00
Nuno Lopes dd30e2c677 add the other test case for completeness and to avoid regressions in the future
llvm-svn: 55629
2008-09-02 10:10:14 +00:00
Matthijs Kooijman 7b704a502b Revert r55557, it is causing linking failures on 32bit linux.
llvm-svn: 55628
2008-09-02 09:51:00 +00:00
Eli Friedman de09ce03c4 Fix for PR2747: allow pointer->int casts with a null base; these are
offset-of-like expressions.

llvm-svn: 55627
2008-09-02 09:37:00 +00:00
Evan Cheng 52b181206f MMI may be null.
llvm-svn: 55626
2008-09-02 08:14:01 +00:00
Evan Cheng df8cdc3717 Add Mac OS X compatible JIT callback routine.
llvm-svn: 55625
2008-09-02 07:49:03 +00:00
Evan Cheng 3be5b728b1 Revamp ARM JIT.
llvm-svn: 55624
2008-09-02 06:52:38 +00:00
Evan Cheng 34f3a962b0 Change getBinaryCodeForInstr prototype. First operand MachineInstr& should be const. Make corresponding changes.
llvm-svn: 55623
2008-09-02 06:51:36 +00:00
Eli Friedman ee29c9c2fc Fix for PR2750; don't check for an 'e' in the trash after the token.
Note that this isn't really a complete fix; I think there are other 
potential overrun situations.  I don't really know what the best 
systematic fix is, though.

llvm-svn: 55622
2008-09-02 05:29:22 +00:00
Eli Friedman 7c9ba6a1e3 An extremely hacky version of transparent_union support; it isn't
anywhere near correct in terms of missing cases and missing 
diagnostics, but it's good enough to handle the uses in the 
Linux system headers, which are currently a constant pain for compiling 
applications on Linux.

llvm-svn: 55621
2008-09-02 05:19:23 +00:00
Eli Friedman e7175d83dc Make sure to take the unqualified versions of the canonical types for
type-checking pointer subtraction; if the canonical types aren't used,
the qualifiers won't always get stripped off correctly.

llvm-svn: 55620
2008-09-02 05:09:35 +00:00
Zhongxing Xu a1035df101 Fit the comments into 80 columns.
llvm-svn: 55619
2008-09-02 03:29:51 +00:00
Ted Kremenek fd8ede33db Updated checker build.
llvm-svn: 55618
2008-09-01 22:51:34 +00:00
Nuno Lopes 4e630967fc readd test as it passes correctly. nice, but weird
llvm-svn: 55615
2008-09-01 22:28:55 +00:00
Eli Friedman 4c55e2c4ed Backing out r55607 due to logic errors and test regression.
I'll try to come up with a correct fix for the testcase sometime soon.

llvm-svn: 55614
2008-09-01 22:08:17 +00:00
Ted Kremenek 8af7e8b650 Updated checker build.
llvm-svn: 55613
2008-09-01 20:13:28 +00:00
Ted Kremenek c4f6d90ba1 Tidy up sema processing of attribute "nonull":
- warn about nonnull being applied to functions with no pointer arguments
- continue processing argument list in the attribute when we encounter a non-pointer parameter being marked as nonnull
- when no argument list is specified, only mark pointers as nonnull.  This fixes PR 2732 and radar 6188814.

llvm-svn: 55610
2008-09-01 19:57:52 +00:00
Nuno Lopes 2c5208c59f fix one more this-is-not-a-constant error. test included
llvm-svn: 55609
2008-09-01 18:42:41 +00:00
Gabor Greif 9c64e61176 Provide two overloads of AnalyzeNewNode.
The first can update the SDNode in an SDValue
while the second is called with SDNode* and
returns a possibly updated SDNode*.

This patch has no intended functional impact,
but helps eliminating ugly temporary SDValues.

llvm-svn: 55608
2008-09-01 15:10:19 +00:00
Nuno Lopes feac637074 make CheckArithmeticConstantExpression() aware of &foo and pointers
llvm-svn: 55607
2008-09-01 14:47:06 +00:00
Duncan Sands 4b31a2a7ce Even though no caller actually uses the new value
(what matters is that it is added to the worklist),
it seems more logical to return it.

llvm-svn: 55606
2008-09-01 13:11:13 +00:00
Duncan Sands fdbe925974 Turn this legalize types test on.
llvm-svn: 55605
2008-09-01 12:00:55 +00:00
Duncan Sands 130d9efec3 Add a small pass that sets the readnone/readonly
attributes on functions, based on the result of
alias analysis.  It's not hardwired to use
GlobalsModRef even though this is the only (AFAIK)
alias analysis that results in this pass actually
doing something.  Enable as follows:
  opt ... -globalsmodref-aa -markmodref ...
Advantages of this pass: (1) records the result
of globalsmodref in the bitcode, meaning it is
available for use by later passes (currently
the pass manager isn't smart enough to magically
make an advanced alias analysis available to all
later passes), which may expose more optimization
opportunities; (2) hopefully speeds up compilation
when code is optimized twice, for example when a
file is compiled to bitcode, then later LTO is done
on it: marking functions readonly/readnone when
producing the initial bitcode should speed up alias
analysis during LTO; (3) good for discovering that
globalsmodref doesn't work very well :)
Not currently turned on by default.

llvm-svn: 55604
2008-09-01 11:40:11 +00:00
Nuno Lopes f380a0de07 codegen constant data as such. add QualType::isConstant()
llvm-svn: 55603
2008-09-01 11:33:04 +00:00
Evan Cheng fa558788e7 Control flow instruction encodings.
llvm-svn: 55601
2008-09-01 08:25:56 +00:00
Evan Cheng c288cc0572 ldm / stm instruction encodings.
llvm-svn: 55599
2008-09-01 07:48:18 +00:00
Evan Cheng c37532b24a AXI2 and AXI3 instruction encodings.
llvm-svn: 55598
2008-09-01 07:34:13 +00:00
Evan Cheng a282723499 Reorganize instruction formats again; AXI1 encoding.
llvm-svn: 55597
2008-09-01 07:19:00 +00:00
Evan Cheng 169eccc24e addrmode3 instruction encodings.
llvm-svn: 55596
2008-09-01 07:00:14 +00:00