Commit Graph

86343 Commits

Author SHA1 Message Date
Devang Patel cefe3831b7 MDString is already checked earlier.
llvm-svn: 107516
2010-07-02 21:13:23 +00:00
Sean Callanan 2df8a1f39c Added the skeleton of a transformation pass to
convert IR to DWARF.  So far, this pass only
performs a depth-first traversal of the IR,
logging each basic block as it finds it.

llvm-svn: 107515
2010-07-02 21:09:36 +00:00
Evan Cheng c3525dc0fd Remove early IT block formation. It's not used.
llvm-svn: 107513
2010-07-02 21:07:09 +00:00
Zhanyong Wan 5bf71a3af5 Make RecursiveASTVisitor traverse function parameter types in a function
prototype declaration.  Reviewed by chandlerc and csilvers.

llvm-svn: 107511
2010-07-02 21:02:30 +00:00
Douglas Gregor 7454c563f1 Lazily declare the implicitly-declared destructor in a C++ class.
llvm-svn: 107510
2010-07-02 20:37:36 +00:00
Evan Cheng 0ce84486c3 - Two-address pass should not assume unfolding is always successful.
- X86 unfolding should check if the instructions being unfolded has memoperands.
  If there is no memoperands, then it must assume conservative alignment. If this
  would introduce an expensive sse unaligned load / store, then unfoldMemoryOperand
  etc. should not unfold the instruction.

llvm-svn: 107509
2010-07-02 20:36:18 +00:00
Johnny Chen c653d4c574 Fixed logic error; checking return status and raising exception should only be
done if the environment variable LLDB_LOG is defined.

llvm-svn: 107508
2010-07-02 20:35:23 +00:00
Dan Gohman 2eaa26e8ea Remove an unused enum.
llvm-svn: 107507
2010-07-02 20:20:50 +00:00
Dale Johannesen 4d887f7ca7 Propagate the AlignStack bit in InlineAsm's to the
PrologEpilog code, and use it to determine whether
the asm forces stack alignment or not.  gcc consistently
does not do this for GCC-style asms; Apple gcc inconsistently
sometimes does it for asm blocks.  There is no
convenient place to put a bit in either the SDNode or
the MachineInstr form, so I've added an extra operand
to each; unlovely, but it does allow for expansion for
more bits, should we need it.  PR 5125.  Some
existing testcases are affected.
The operand lists of the SDNode and MachineInstr forms
are indexed with awesome mnemonics, like "2"; I may
fix this someday, but not now.  I'm not making it any
worse.  If anyone is inspired I think you can find all
the right places from this patch.

llvm-svn: 107506
2010-07-02 20:16:09 +00:00
Jakob Stoklund Olesen df8429aeb4 Remove invalid assert
llvm-svn: 107505
2010-07-02 19:54:47 +00:00
Jakob Stoklund Olesen 9e2d9478f2 Handle unindexed instructions in SlotIndices.
SlotIndexes::insertMachineInstrInMaps would crash when trying to insert an
instruction imediately after an unmapped debug value.

llvm-svn: 107504
2010-07-02 19:54:45 +00:00
Jakob Stoklund Olesen cf6c5c960f Properly handle debug values during inline spilling.
llvm-svn: 107503
2010-07-02 19:54:40 +00:00
Eli Friedman b6c9e103a1 Implement GetProgramFileSpec().
llvm-svn: 107502
2010-07-02 19:38:10 +00:00
Eli Friedman 5423ebff13 Add hacky, incomplete Linux host implementation; barely enough to allow
compiling lldb.  Someone else might try to improve it, though. :)

llvm-svn: 107501
2010-07-02 19:28:44 +00:00
Gabor Greif 9da02a83e9 beautify output
llvm-svn: 107500
2010-07-02 19:26:28 +00:00
Eli Friedman feaeebfb5d Add const qualification; fixes error on gcc 4.4.
llvm-svn: 107499
2010-07-02 19:15:50 +00:00
Gabor Greif e537ddbdb4 use ArgOperand API
llvm-svn: 107498
2010-07-02 19:08:46 +00:00
Craig Silverstein 27e11400ad Don't visit implicitly defined functions (default constructors and the
like).  Our goal with this visitor is to visit exactly what people type.

Reviewed by chandlerc.

llvm-svn: 107497
2010-07-02 19:07:50 +00:00
Dan Gohman 832282e061 Don't claim to preserve AliasAnalysis. First, this is doesn't actually
have any effect, and second, deleting stores can potentially invalidate
an AliasAnalysis, and there's currently no notification for this.

llvm-svn: 107496
2010-07-02 18:43:05 +00:00
Dan Gohman df12d08b8e Reword the definition of the noalias attribute. The intention is for
the noalias argument on function attributes be usable to model the
C99 restrict keyword on arguments, and to allow AliasAnalysis to
consider a noalias-attributed argument to be an "identified object".

To support this, refactor a new "based on" concept out of the current
pointer aliasing "associated" concept. This "based on" concept is very
similar to (though it is not identical with) the "based on" concept
in C99.

Also, reword the definition of NoAlias to more closely describe the
concept that the optimizer uses.

llvm-svn: 107495
2010-07-02 18:41:32 +00:00
Greg Clayton d2d60ce388 Updated to llvm/clang from July 2, 2010 at 8:00AM.
llvm-svn: 107494
2010-07-02 18:39:06 +00:00
Jakob Stoklund Olesen 96037187e5 Rematerialize as much as possible before inserting spills and reloads.
This allows us to recognize the common case where all uses could be
rematerialized, and no stack slot allocation is necessary.

If some values could be fully rematerialized, remove them from the live range
before allocating a stack slot for the rest.

llvm-svn: 107492
2010-07-02 17:44:57 +00:00
Douglas Gregor 0be31a2eb7 Move the "current scope" state from the Parser into Action. This
allows Sema some limited access to the current scope, which we only
use in one way: when Sema is performing some kind of declaration that
is not directly driven by the parser (e.g., due to template
instantiatio or lazy declaration of a member), we can find the Scope
associated with a DeclContext, if that DeclContext is still in the
process of being parsed. 

Use this to make the implicit declaration of special member functions
in a C++ class more "scope-less", rather than using the NULL Scope hack.

llvm-svn: 107491
2010-07-02 17:43:08 +00:00
Jim Grosbach 9b7755fbc6 80-column and trailing whitespace cleanup.
llvm-svn: 107490
2010-07-02 17:41:59 +00:00
Jim Grosbach 64a4f3f062 grammar tweaks
llvm-svn: 107489
2010-07-02 17:38:34 +00:00
Bob Wilson 771d04b969 Fix incorrect asm-printing of some NEON immediates. Fix weak testcase so
that it checks the immediate values, not just the instructions opcodes.
Radar 8110263.

llvm-svn: 107487
2010-07-02 17:23:44 +00:00
Douglas Gregor 05dac7d154 By default, warn about commas at the end of an enumerator list in C++/C89.
llvm-svn: 107485
2010-07-02 16:17:01 +00:00
Argyrios Kyrtzidis 335751610e Handle CXXConstructorDecl, CXXDestructorDecl, and CXXConversionDecl for PCH.
<vector> header can be used correctly through PCH now.

llvm-svn: 107483
2010-07-02 15:58:43 +00:00
Gabor Greif 56de4675b6 use ArgOperand API (found by my previous commit)
llvm-svn: 107482
2010-07-02 13:37:16 +00:00
Gabor Greif eac10bc1f6 back out r107480, it was just testing the waters anyway...
llvm-svn: 107481
2010-07-02 13:27:50 +00:00
Gabor Greif f89f3ebfff [test commit, just to tickle the selfhost buildbots; I'll back out in a few minutes]
second round of low-level interface squeeze-out:
making all of CallInst's low-level operand accessors
private

If you get compile errors I strongly urge you to
update your code.


I tried to write the necessary clues into the
header where the compiler may point to, but no
guarantees. It works for my GCC.

You have several options to update your code:

- you can use the v2.8 ArgOperand accessors
- you can go via a temporary CallSite
- you can upcast to, say, User and call its
  low-level accessors if your code is definitely
  operand-order agnostic.

If you run into serious problems, please
comment in below thread (and back out this
revision only if absolutely necessary):

<http://groups.google.com/group/llvm-dev/browse_thread/thread/64650cf343b28271>

llvm-svn: 107480
2010-07-02 13:21:55 +00:00
Argyrios Kyrtzidis 746c889e34 Provide some test cases for C++ PCH.
llvm-svn: 107479
2010-07-02 11:55:48 +00:00
Argyrios Kyrtzidis a45855fc2a Disable Decl::CheckAccessDeclContext() temporarily.
llvm-svn: 107478
2010-07-02 11:55:44 +00:00
Argyrios Kyrtzidis 373a83abdc Fix reading FunctionDecls from PCH.
llvm-svn: 107477
2010-07-02 11:55:40 +00:00
Argyrios Kyrtzidis e23371e71d Fix reading ClassTemplateDecl's ClassTemplateSpecializationDecls and ClassTemplatePartialSpecializationDecls.
Store/read also their template arguments because they may be initializing and not be able to provide them.

llvm-svn: 107476
2010-07-02 11:55:37 +00:00
Argyrios Kyrtzidis 2c2167ac3d Fully read/write CXXRecordDecl for PCH.
llvm-svn: 107475
2010-07-02 11:55:32 +00:00
Argyrios Kyrtzidis e929095f4a Fix reading of DependentNameType.
llvm-svn: 107474
2010-07-02 11:55:24 +00:00
Argyrios Kyrtzidis dab33c5d33 Allow reading of InjectedClassNameType from PCH even when its decl is currently initializing.
llvm-svn: 107473
2010-07-02 11:55:20 +00:00
Argyrios Kyrtzidis ee776bcb7a Fix broken reading of member pointer from PCH.
llvm-svn: 107472
2010-07-02 11:55:15 +00:00
Argyrios Kyrtzidis 45a83f9acc - Allow a typedef type to be read from PCH even if its decl is currently initializing.
- Fix creation of TemplateSpecializationType.

llvm-svn: 107471
2010-07-02 11:55:11 +00:00
Argyrios Kyrtzidis e3029a7e7b Fix broken reading of "#lines" from PCH.
llvm-svn: 107470
2010-07-02 11:55:05 +00:00
Argyrios Kyrtzidis 318b0e78c6 Generally types expect an initialized TypeDecl; its safer and less complicated to delay PCH reading the type of a TypeDecl.
llvm-svn: 107469
2010-07-02 11:55:01 +00:00
Argyrios Kyrtzidis 39f0e308c4 Add some side-effect free Create methods for TypeDecl subclasses and use them for PCH reading.
llvm-svn: 107468
2010-07-02 11:54:55 +00:00
Zhongxing Xu d6c221c3ee Create a ASTUnitTU class to interface ASTUnit to the Indexer.
llvm-svn: 107467
2010-07-02 11:52:15 +00:00
Zhongxing Xu a94ec74c6f add -analyze-function option.
llvm-svn: 107463
2010-07-02 07:03:03 +00:00
Zhongxing Xu 7842c0836d add -view-call-graph option to wpa.
llvm-svn: 107462
2010-07-02 06:58:30 +00:00
Zhongxing Xu a74c22daec Change CallGraph::Prog to be a reference. idx::Program means to be a global object to the Index library.
llvm-svn: 107461
2010-07-02 06:39:46 +00:00
Sean Callanan 609f8c584a Added a method to get a stream's byte order.
llvm-svn: 107460
2010-07-02 02:43:42 +00:00
Greg Clayton 0b42ac32c8 More leaks detection:
- fixed 3 posix spawn attributes leaks 
- fixed us always leaking CXXBaseSpecifier objects when we create class 
  base classes. Clang apparently copies the base classes we pass in.

Fixed some code formatting in ClangASTContext.cpp.

llvm-svn: 107459
2010-07-02 01:29:13 +00:00
Dan Gohman 2a91225c23 Comment a non-obvious member variable.
llvm-svn: 107458
2010-07-02 01:20:16 +00:00