Dan Gohman
0d3d9ee03e
Enhance CodePlacementOpt's unconditional intra-loop branch elimination logic
...
to be more general and understand more varieties of loops.
Teach CodePlacementOpt to reorganize the basic blocks of a loop so that
they are contiguous. This also includes a fair amount of logic for preserving
fall-through edges while doing so. This fixes a BranchFolding-ism where blocks
which can't be made to use a fall-through edge and don't conveniently fit
anywhere nearby get tossed out to the end of the function.
llvm-svn: 84295
2009-10-17 00:32:43 +00:00
Dan Gohman
f920463aae
Add a splice member function which accepts a range instead of a
...
single iterator.
llvm-svn: 84294
2009-10-17 00:28:24 +00:00
Douglas Gregor
12bfa3859d
Merge the "types" and "declarations" blocks in the precompiled header
...
format, so that we don't end up with multiple declaration and types
blocks. Also, fix a few obscure bugs with PCH loading and generation:
- If the DeclIDs DenseMap reallocates while we are writing a
declaration (due to recursively writing other declarations), we
could end up writing a bad ID to ExternalDefinitions.
- When loading an ArrayLoc (part of DeclaratorInfo), we need to set
the size expression to NULL if no size expression was provided.
PCH -> AST rewriting is still partly broken, unfortunately.
llvm-svn: 84293
2009-10-17 00:13:19 +00:00
Victor Hernandez
c7d6a8327c
Autoupgrade malloc insts to malloc calls.
...
Update testcases that rely on malloc insts being present.
Also prematurely remove MallocInst handling from IndMemRemoval and RaiseAllocations to help pass tests in this incremental step.
llvm-svn: 84292
2009-10-17 00:00:19 +00:00
Fariborz Jahanian
956127de22
Patch to clean up and improve visual display of
...
builtin function ambiguity.
llvm-svn: 84289
2009-10-16 23:25:02 +00:00
Victor Hernandez
264da3274e
HeapAllocSRoA also needs to check if malloc array size can be computed.
...
llvm-svn: 84288
2009-10-16 23:12:25 +00:00
Douglas Gregor
8655e88603
While writing source-location entries to a PCH file, go through an
...
interface that can load those source-location entries on demand (from
another PCH file).
llvm-svn: 84287
2009-10-16 22:46:09 +00:00
John McCall
1f1a097f66
Allow TypeLocs to be fully initialized with a single SourceLocation. This
...
will be the keystone of converting existing rewrites to be rewrites on TypeLocs.
llvm-svn: 84286
2009-10-16 22:31:57 +00:00
Mon P Wang
1a015acf69
Update tests to use FileCheck
...
llvm-svn: 84282
2009-10-16 22:09:05 +00:00
Fariborz Jahanian
b06ec054fc
Use VisibleQuals to control setting of Volatile/Restrict qualifiers on
...
candidate types in BuiltinCandidateTypeSet::AddPointerWithMoreQualifiedTypeVariants
further trimming the overload candidate set.
llvm-svn: 84281
2009-10-16 22:08:05 +00:00
Mon P Wang
0185b1ea85
Add test case for r84279
...
llvm-svn: 84280
2009-10-16 22:07:19 +00:00
Mon P Wang
b1baaf5ab9
Allow widening of extract subvector
...
llvm-svn: 84279
2009-10-16 22:05:48 +00:00
John McCall
8f115c6b45
Factor out routines to encode/decode DeclaratorInfos and move them into the
...
core PCH reader/writer implementation files.
llvm-svn: 84278
2009-10-16 21:56:05 +00:00
John McCall
ff47031601
Add an accessor to extra the type directly from a DeclaratorInfo
...
without an opaque call.
llvm-svn: 84277
2009-10-16 21:42:04 +00:00
Devang Patel
12524fd2e5
Do not emit name entry for a pointer type.
...
llvm-svn: 84276
2009-10-16 21:27:43 +00:00
Douglas Gregor
d3d923a0f2
Make CIndex and c-index-test a little bit more robust. The only
...
substantive change is that clang_getCursorSource() now returns the
file in which a macro was instantiated when the cursor points into a
macro instantiation, rather than crashing.
llvm-svn: 84275
2009-10-16 21:24:31 +00:00
Evan Cheng
007ceb4603
Change createPostRAScheduler so it can be turned off at llc -O1.
...
llvm-svn: 84273
2009-10-16 21:06:15 +00:00
Evan Cheng
5a28638560
Add a CodeGenOpt::Less level to match -O1. It'll be used by clients which do not want post-regalloc scheduling.
...
llvm-svn: 84272
2009-10-16 21:02:20 +00:00
Dan Gohman
99429a00ff
Move zext and sext casts fed by loads into the same block as the
...
load, to help SelectionDAG fold them into the loads, unless
conditions are unfavorable.
llvm-svn: 84271
2009-10-16 20:59:35 +00:00
Ted Kremenek
70bf6d6102
Fix static analyzer crash due to recently add symbolic-value constant folding. The issue was falsely
...
converting the constant value of the LHS of a '<<'/'>>' operation to the same APSInt value of the
RHS.
llvm-svn: 84269
2009-10-16 20:46:24 +00:00
Ted Kremenek
31fcde13ac
Provide 'static' version of BinaryOperator::isShiftOp().
...
llvm-svn: 84268
2009-10-16 20:45:04 +00:00
Douglas Gregor
16bef857d9
Keep track of whether declararions were loaded from a precompiled
...
header or not via a new "PCHLevel" field in Decl. We currently use
this information to help CIndex filter out declarations that came from
a precompiled header (rather than from an AST file). Further down the
road, it can be used to help implement multi-level precompiled
headers.
llvm-svn: 84267
2009-10-16 20:01:17 +00:00
Edward O'Callaghan
7d3c275526
dynamic linker arg is incorrectly invoking gnu ld arg syntax instead of svr4 ld syntax in AuroraUX toolchain.
...
llvm-svn: 84266
2009-10-16 19:44:18 +00:00
Fariborz Jahanian
da21efb566
Implement derived-to-base AST/code gen. There is a
...
FIXME in CGCXX.cpp that I would like Anders to
take a look at.
llvm-svn: 84265
2009-10-16 19:20:59 +00:00
Devang Patel
8f842d31fd
Parse PHI instruction with attached metadata.
...
llvm-svn: 84264
2009-10-16 18:45:49 +00:00
Douglas Gregor
d2eb58abac
Add support for a chain of stat caches in the FileManager, rather than
...
only supporting a single stat cache. The immediate benefit of this
change is that we can now generate a PCH/AST file when including
another PCH file; in the future, the chain of stat caches will likely
be useful with multiple levels of PCH files.
llvm-svn: 84263
2009-10-16 18:18:30 +00:00
Devang Patel
d0099a94db
If there is not any llvm instruction associated with each lexical scope encoded in debug info then create such scope on demand for variable info.
...
llvm-svn: 84262
2009-10-16 18:18:03 +00:00
Victor Hernandez
6f834660c9
Invert isSafeToGetMallocArraySize check because we return NULL when we don't know the size.
...
Thanks to Duncan Sands for noticing this bug.
llvm-svn: 84261
2009-10-16 18:08:17 +00:00
Victor Hernandez
c81923e07c
Invert isSafeToGetMallocArraySize check because we return NULL when we don't know the size.
...
Thanks to Duncan Sands for noticing this bug.
llvm-svn: 84260
2009-10-16 18:07:17 +00:00
Chris Lattner
a96d427966
Implement PR4407 - missing warnings on case value overflow,
...
patch by Zhanyong Wan!
llvm-svn: 84259
2009-10-16 16:45:22 +00:00
Chris Lattner
519486256c
Update from Cristina, llvm-gcc doesn't build on the SPARC version of solaris
...
at the moment.
llvm-svn: 84258
2009-10-16 16:30:58 +00:00
Daniel Dunbar
6a19c14968
Force triple in tests.
...
llvm-svn: 84257
2009-10-16 16:30:02 +00:00
Duncan Sands
0058c7bcb0
Strip trailing white space.
...
llvm-svn: 84256
2009-10-16 15:20:13 +00:00
Nuno Lopes
8550cb250c
ignore 'using' directive in CodeGenFunction::EmitDecl(). this fixes PR5085
...
llvm-svn: 84255
2009-10-16 14:40:52 +00:00
Nuno Lopes
275225dd05
fix -ansi in c++: it means -std=c++98
...
llvm-svn: 84254
2009-10-16 14:28:06 +00:00
Duncan Sands
de3f2c26c6
Check that GVN performs this transform even if the calls
...
themselves are not marked readonly, but only the called
functions.
llvm-svn: 84253
2009-10-16 12:18:23 +00:00
Benjamin Kramer
ca019e704c
Update CMake file.
...
llvm-svn: 84252
2009-10-16 10:29:08 +00:00
Sanjiv Gupta
89259d7929
Cleaned up some code. No functionality change.
...
llvm-svn: 84251
2009-10-16 08:58:34 +00:00
Evan Cheng
343d17d762
I am no spelling bee.
...
llvm-svn: 84250
2009-10-16 06:18:09 +00:00
Evan Cheng
03da4dba59
Enable post-alloc scheduling for all ARM variants except for Thumb1.
...
llvm-svn: 84249
2009-10-16 06:11:08 +00:00
Evan Cheng
8b614768f8
If post-alloc scheduler is not enabled, it should return false, not true.
...
llvm-svn: 84248
2009-10-16 06:10:34 +00:00
Zhongxing Xu
47062ce503
Indent code.
...
llvm-svn: 84247
2009-10-16 05:42:28 +00:00
Evan Cheng
8cd7c92613
Add comment.
...
llvm-svn: 84246
2009-10-16 05:33:58 +00:00
Anders Carlsson
43d70f874d
Add CK_VectorSplat and use it for casting non-pointer scalars to ExtVectors.
...
llvm-svn: 84245
2009-10-16 05:23:41 +00:00
Evan Cheng
9c096840a0
80 column violation.
...
llvm-svn: 84244
2009-10-16 05:18:39 +00:00
Bob Wilson
01404ecec7
Fix more NEON instruction encodings.
...
Patch by Johnny Chen.
llvm-svn: 84243
2009-10-16 03:58:44 +00:00
Anders Carlsson
525b76b59c
Make CheckVectorCast return a CastKind. Reduce nesting of if statements in CheckCastTypes.
...
llvm-svn: 84242
2009-10-16 02:48:28 +00:00
Anders Carlsson
ef918ac840
Add a ToVoid cast kind and start using it.
...
llvm-svn: 84241
2009-10-16 02:35:04 +00:00
Chris Lattner
cb4e68c340
increase helpfulness of assert message.
...
llvm-svn: 84240
2009-10-16 02:34:51 +00:00
Chris Lattner
4794b2b27b
Add half precision floating point support (float16) to APFloat,
...
patch by Peter Johnson! (PR5195)
llvm-svn: 84239
2009-10-16 02:13:51 +00:00