Commit Graph

7305 Commits

Author SHA1 Message Date
Daniel Dunbar
ab197ebb1a Change EmitBranch to always clear the insert point to clarify irgen
invariants.

llvm-svn: 59085
2008-11-11 22:06:59 +00:00
Daniel Dunbar
fab3f936dd Emit debug region end in unified return block.
llvm-svn: 59081
2008-11-11 20:59:54 +00:00
Anton Korobeynikov
fdf389b9e4 Codegen support for fastcall & stdcall CC.
Patch by Ilya Okonsky!

llvm-svn: 59080
2008-11-11 20:21:14 +00:00
Ted Kremenek
7a18858bcf Flow-sensitive uninitialized values analysis:
- Added support for ObjCForCollectionStmt
- Fixed bug where expression values would be always set to uninitialized when loops were involved

llvm-svn: 59076
2008-11-11 19:41:42 +00:00
Ted Kremenek
3b4e1d5cc6 Accesses to a collection within a fast enumeration 'for' statement constitute a 'use'.
llvm-svn: 59075
2008-11-11 19:40:47 +00:00
Ted Kremenek
1d7f2fcda8 Add fine-grain methods for control which bits are set/reset in ExprDeclBitVector.
llvm-svn: 59073
2008-11-11 19:39:47 +00:00
Chris Lattner
d53e23328e Try to not emit the dead side of ?: if the condition is a constant.
llvm-svn: 59061
2008-11-11 18:56:45 +00:00
Chris Lattner
c3b41e31fb "a patch telling cmake to install clang headers in the target
install directory"

Patch by Lukasz Janyst!

llvm-svn: 59059
2008-11-11 18:39:10 +00:00
Sebastian Redl
6f28289aca Introduce a single AST node SizeOfAlignOfExpr for all sizeof and alignof expressions, both of values and types.
llvm-svn: 59057
2008-11-11 17:56:53 +00:00
Ted Kremenek
fbd2f4006b Add transfer function support for ObjCForCollectionStmt to LiveVariables.
llvm-svn: 59053
2008-11-11 17:42:10 +00:00
Ted Kremenek
9d56e64543 Add CFG support for Objective-C 2.0 fast enumeration 'for' statement:
http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_7_section_2.html#//apple_ref/doc/uid/TP30001163-CH18-SW3

Need to modify GRExprEngine, LiveVariables, and UninitializedValues to understand this construct.

llvm-svn: 59049
2008-11-11 17:10:00 +00:00
Sebastian Redl
c470476420 Implement C++ 'typeid' parsing and sema.
llvm-svn: 59042
2008-11-11 11:37:55 +00:00
Daniel Dunbar
c56e67644f Add CodeGenFunction::EmitBranch.
- Emits an unconditional branch, with extra logic to avoid generating
   spurious branches out of dummy blocks.

llvm-svn: 59037
2008-11-11 09:41:28 +00:00
Daniel Dunbar
a0821bf8a2 Fix cmake build, patch from Jjgod Jiang.
llvm-svn: 59036
2008-11-11 08:29:24 +00:00
Chris Lattner
5b1964b5f9 short circuit && and || when possible. This substantially reduces
the size of the -O0 output on some cases.  For example, on expr.c from
176.gcc, it shrinks the .ll file from 43164 to 42835 lines, and removed
references to two external symbols.

llvm-svn: 59034
2008-11-11 07:41:27 +00:00
Chris Lattner
aaaa199ad1 Make codegen smart enough to not emit the dead side of an if whose
condition is a constant.  This shrinks -O0 codegen by quite a bit
on some cases.

llvm-svn: 59033
2008-11-11 07:24:28 +00:00
Chris Lattner
cd2523b41c implement debug info for typeof()
llvm-svn: 59032
2008-11-11 07:01:36 +00:00
Chris Lattner
bd178d51ff merge some testcases together.
llvm-svn: 59031
2008-11-11 06:42:53 +00:00
Daniel Dunbar
a94d873b4b Move backend output out of destructor.
Don't free AST consumer when --disable-free is set.

llvm-svn: 59030
2008-11-11 06:35:39 +00:00
Chris Lattner
4497fbf6e0 remove the wrong PR # from the file name.
llvm-svn: 59029
2008-11-11 06:28:10 +00:00
Chris Lattner
d75e4e59b9 add PR#
llvm-svn: 59028
2008-11-11 06:27:34 +00:00
Chris Lattner
8c5dd730ce Fix PR3031 by silencing follow-on errors in invalid declarations.
llvm-svn: 59027
2008-11-11 06:13:16 +00:00
Daniel Dunbar
c92892d9cc Remove unused function declaration.
llvm-svn: 59024
2008-11-11 04:48:20 +00:00
Daniel Dunbar
29ac59f25c Add CodeGenFunction::EmitDummyBlock for marking places where we make
"dummy" blocks (blocks just used to make sure we have a place to dump
code to).

llvm-svn: 59022
2008-11-11 04:34:23 +00:00
Daniel Dunbar
05e629aec6 Remove CodeGenFunction::StartBlock.
- Was confusing and only used in one small part of the code.

llvm-svn: 59020
2008-11-11 04:12:31 +00:00
Daniel Dunbar
471d9ddeab These tests have no needed to redirect stderr to stdout.
llvm-svn: 59019
2008-11-11 04:09:47 +00:00
Daniel Dunbar
75283ff38a Centralize basic block creation in CodeGenFunction::createBasicBlock.
- No functionality change.

llvm-svn: 59017
2008-11-11 02:29:29 +00:00
Zhongxing Xu
deb7cac332 Fix StringLiteral print bug.
llvm-svn: 59015
2008-11-11 01:36:32 +00:00
Zhongxing Xu
f8b84b0def Add && to test command.
llvm-svn: 59014
2008-11-11 01:25:18 +00:00
Daniel Dunbar
e27d7b5530 Fix Release-Asserts warning.
llvm-svn: 59013
2008-11-11 01:16:00 +00:00
Douglas Gregor
cd695e500d Basic support for taking the address of an overloaded function
llvm-svn: 59000
2008-11-10 20:40:00 +00:00
Steve Naroff
23394ab63f Update VC++ project file.
llvm-svn: 58996
2008-11-10 20:02:45 +00:00
Douglas Gregor
d36ed56c52 Remove an out-of-date FIXME
llvm-svn: 58990
2008-11-10 17:01:38 +00:00
Douglas Gregor
49de5340c0 Improve parser error recovery after a constructor initializer
llvm-svn: 58989
2008-11-10 16:59:40 +00:00
Douglas Gregor
f52cdd0124 Allow user-defined conversions during reference binding
llvm-svn: 58988
2008-11-10 16:14:15 +00:00
Douglas Gregor
1cd48f1645 Don't create a typedef for the injected-class-name
llvm-svn: 58987
2008-11-10 14:41:22 +00:00
Douglas Gregor
6cf0806e75 Some cleanups to the declaration/checking of overloaded operators in C++. Thanks to Sebastian for the review
llvm-svn: 58986
2008-11-10 13:38:07 +00:00
Zhongxing Xu
bba5c7c629 Add pretty printing to StringRegion.
llvm-svn: 58985
2008-11-10 13:05:26 +00:00
Zhongxing Xu
7be05ed6b8 Add region store model to path-sensitive testing.
llvm-svn: 58983
2008-11-10 09:43:12 +00:00
Zhongxing Xu
18d6fd45de Implement RegionStoreManager::RemoveDeadBindings(). This prunes several false warning caused by removal of symbolic constraints. Currently we just mark all symbols live. Further optimization for dead binding removal needed.
llvm-svn: 58982
2008-11-10 09:39:04 +00:00
Chris Lattner
b5d21a4d03 don't preserve names on IR instructions. This matches llvm-gcc's behavior and
speeds up the compiler by ~8% at -emit-llvm -O0.

llvm-svn: 58977
2008-11-10 06:31:46 +00:00
Chris Lattner
494e4a6e3e sort files add a missed header to the project.
llvm-svn: 58976
2008-11-10 06:31:19 +00:00
Chris Lattner
f61801403d Fix even more bugs in debug info support:
1. emit proper debug info for forward decls of structs.
2. emit DW_TAG_member nodes around members of a field like llvm-gcc does.

This slows down debug info generation, but is required for correctness.

llvm-svn: 58973
2008-11-10 06:10:01 +00:00
Chris Lattner
affb37337f reimplement debug info generation in terms of DebugInfo.h instead of
using MachineModuleInfo.  This runs at about the same speed as the old
code, but fixes a bunch of bugs and is simpler and shorter.

llvm-svn: 58971
2008-11-10 06:08:34 +00:00
Zhongxing Xu
1c31dbe417 Print integer value instead of raw pointer. This is a hack to be fixed by migrating the output in analyzer to llvm::raw_ostream.
llvm-svn: 58965
2008-11-10 05:00:06 +00:00
Chris Lattner
231f7bbdbe silence a warning from gcc.
llvm-svn: 58956
2008-11-10 03:00:37 +00:00
Argyrios Kyrtzidis
9e59b577d8 Introduce ScopedDecl::getLexicalDeclContext() which is different from ScopedDecl::getDeclContext() when there are nested-names.
e.g.:
  namespace A {
    void f(); // SemanticDC (getDeclContext) == LexicalDC (getLexicalDeclContext) == 'namespace A'
  }
  void A::f(); // SemanticDC == namespace 'A'
               // LexicalDC == global namespace

llvm-svn: 58948
2008-11-09 23:41:00 +00:00
Argyrios Kyrtzidis
8ad00b26ee When a tag has nested-name ('struct foo::bar'), use not 'CurContext' but the context of the nested-name ('foo::').
llvm-svn: 58945
2008-11-09 22:53:32 +00:00
Argyrios Kyrtzidis
e02eb2bac2 Simplify handling of nested-names in tags ('struct foo::bar').
-Use more of the non nested-name code path.
-Also use the ActOnTagStruct code path.

llvm-svn: 58944
2008-11-09 22:09:58 +00:00
Anders Carlsson
3442f82c2f Support named operands in inline asm statements.
llvm-svn: 58940
2008-11-09 18:54:14 +00:00