Commit Graph

128781 Commits

Author SHA1 Message Date
Rafael Espindola 9aa1fcce58 Use LTO_CODEGEN_PIC_MODEL_DYNAMIC for PIE. This requirest a git version of
gold to work. Since the enum value LDPO_PIE has just been added to plugin-api.h,
use a numeric constant for now so that we don't require an unreleased
version of gold to build.

llvm-svn: 158402
2012-06-13 13:30:24 +00:00
Duncan Sands 409d8ae165 It is possible for several constants which aren't individually absorbing to
combine to the absorbing element.  Thanks to nbjoerg on IRC for pointing this 
out.

llvm-svn: 158399
2012-06-13 12:15:56 +00:00
Duncan Sands 318a89ddac When linearizing a multiplication, return at once if we see a factor of zero,
since then the entire expression must equal zero (similarly for other operations
with an absorbing element).  With this in place a bunch of reassociate code for
handling constants is dead since it is all taken care of when linearizing.  No
intended functionality change.

llvm-svn: 158398
2012-06-13 09:42:13 +00:00
Craig Topper 71dc02d659 Fix intrinsics for XOP frczss/sd instructions. These instructions only take one source register and zero the upper bits of the destination rather than preserving them.
llvm-svn: 158396
2012-06-13 07:18:53 +00:00
Daniel Jasper 4e525e216d Rename shouldVisitImplicitDeclarations to shouldVisitImplicitCode.
Fix RecursiveASTVisitor to visit CXXForRangeStmts accordingly to visit
implicit or explicit code.

The key bug that inspired this was the Visitor not visiting the range
initializer of such a loop, which is explicit code.

llvm-svn: 158395
2012-06-13 07:12:33 +00:00
Hal Finkel 9898614854 Add another missing 64-bit itinerary definition for the PPC A2 core.
llvm-svn: 158393
2012-06-13 05:55:09 +00:00
Manman Ren d33f4efbfd SimplifyCFG: fold unconditional branch to its predecessor if profitable.
This patch extends FoldBranchToCommonDest to fold unconditional branches.
For unconditional branches, we fold them if it is easy to update the phi nodes 
in the common successors.

rdar://10554090

llvm-svn: 158392
2012-06-13 05:43:29 +00:00
Richard Smith 0948d93b7f Fix off-by-one error in UTF-16 encoding: don't try to use a surrogate pair for U+FFFF.
llvm-svn: 158391
2012-06-13 05:41:29 +00:00
Richard Smith 4060f77462 PR13099: Teach -Wformat about raw string literals, UTF-8 strings and Unicode escape sequences.
llvm-svn: 158390
2012-06-13 05:37:23 +00:00
Jakob Stoklund Olesen 1c66b87f7d Eliminate struct TableGenBackend.
TableGen backends are simply written as functions now.

Patch by Sean Silva!

llvm-svn: 158389
2012-06-13 05:15:49 +00:00
Jakob Stoklund Olesen 995e0e13fa Make clang-tblgen backends functions instead of TableGenBackends.
Get rid of a bunch of header files. TableGen output should be unaffected.

Patch by Sean Silva!

llvm-svn: 158388
2012-06-13 05:12:41 +00:00
Michael Han d17deb5bf6 Update clang attribute document.
Remove the instructions on manually adding boilerplate code of AttributeList::Kind and AttributeList::getKind().
Both are now generated by tblgen.

llvm-svn: 158386
2012-06-13 03:51:05 +00:00
Akira Hatanaka 21371766d1 Clean up trailing blanks in Mips16InstrFormats.td
Patch by Reed Kotler.

llvm-svn: 158382
2012-06-13 02:42:47 +00:00
Akira Hatanaka 5fa541231b disable use of directive .set nomicromips
until this directive is pushed in gas to open source fsf

Patch by Reed Kotler.

llvm-svn: 158381
2012-06-13 02:41:14 +00:00
Andrew Trick 344fb64fa3 sched: fix latency of memory dependence chain edges for consistency.
For store->load dependencies that may alias, we should always use
TrueMemOrderLatency, which may eventually become a subtarget hook. In
effect, we should guarantee at least TrueMemOrderLatency on at least
one DAG path from a store to a may-alias load.

This should fix the standard mode as well as -enable-aa-sched-mi".

llvm-svn: 158380
2012-06-13 02:39:03 +00:00
Andrew Trick 5b90645abb sched: Avoid trivially redundant DAG edges. Take the one with higher latency.
llvm-svn: 158379
2012-06-13 02:39:00 +00:00
Akira Hatanaka 3fe00f29ad 1. fix places where immed is used in place of imm to be consistent with
non mips16
2. fix some comments to change OPcode->EXTEND for extended instructions

Patch by Reed Kotler.

llvm-svn: 158378
2012-06-13 02:37:54 +00:00
Richard Smith 25a80d424b Add missing narrowing check: converting from a signed integral type to a wider
unsigned type is narrowing if the source is non-constant or negative.

llvm-svn: 158377
2012-06-13 01:07:41 +00:00
Charles Davis a81618db44 Grab bag of Microsoft Mangler fixes:
- Support mangling virtual function tables (base tables need work on the
  ManglerContext interface).
- Correct mangling of local scopes (i.e. functions and C++ methods).
- Replace every llvm_unreachable() for actually-reachable code with a
  diagnostic.

llvm-svn: 158376
2012-06-13 00:18:14 +00:00
Nick Kledzik c890ae41e2 flesh out mach-o Reference Kinds
llvm-svn: 158375
2012-06-12 23:01:30 +00:00
Nick Kledzik b47d6ca3a5 Wrote initial doc on how to create a Reader
llvm-svn: 158374
2012-06-12 22:43:35 +00:00
Hal Finkel 79c39da135 Add some missing 64-bit itinerary definitions for the PPC A2 core.
llvm-svn: 158373
2012-06-12 20:32:29 +00:00
Chad Rosier 075608ecfc [ms-inline-asm] The __asm keyword is a statement separator, so multiple asm
statements are allowed on the same line.

llvm-svn: 158372
2012-06-12 20:30:26 +00:00
Duncan Sands 72aea01b6e Use DenseMap as SmallMap workaround rather than std::map, at Chandler's request.
llvm-svn: 158371
2012-06-12 20:26:43 +00:00
Bob Wilson d5ea39a871 Fix test to work when clang is built without powerpc64 support.
llvm-svn: 158370
2012-06-12 20:22:45 +00:00
Duncan Sands 67cd591989 Use std::map rather than SmallMap because SmallMap assumes that the value has
POD type, causing memory corruption when mapping to APInts with bitwidth > 64.
Merge another crash testcase into crash.ll while there.

llvm-svn: 158369
2012-06-12 20:16:51 +00:00
Chad Rosier c6916f88a8 [arm-fast-isel] Add support for -arm-long-calls.
Patch by Jush Lu <jush.msn@gmail.com>.

llvm-svn: 158368
2012-06-12 19:25:13 +00:00
Chad Rosier 0764e0bb30 [ms-inline-asm] Cleanup MS style inline assembly parsing.
Specifically, improve the handling of whitespace, stop saving tokens that are
in comments and fix the case where we have a comment followed by a closing brace
on the next line.

Unfortunately, there's no easy way of testing this code.

llvm-svn: 158367
2012-06-12 19:03:42 +00:00
Hal Finkel 8c33dde666 Split out the PPC instruction class IntSimple from IntGeneral.
On the POWER7, adds and logical operations can also be handled
in the load/store pipelines. We'll call these IntSimple.

llvm-svn: 158366
2012-06-12 19:01:24 +00:00
Manuel Klimek 6d6baa88f6 Add documentation for the JSON compilation database format.
llvm-svn: 158365
2012-06-12 17:51:04 +00:00
David Blaikie 5452aa5f47 Remove use of GNU extension to resolve Clang warning.
llvm-svn: 158364
2012-06-12 17:06:32 +00:00
Hal Finkel f1cc96ab50 Fixes for PPC host detection and features.
POWER4 is a 64-bit CPU (better matched to the 970).
The g3 is really the 750 (no altivec), the g4+ is the 74xx (not the 750).

Patch by Andreas Tobler.

llvm-svn: 158363
2012-06-12 16:39:23 +00:00
Dmitri Gribenko a99fa5b062 Use correct syntax highliter in code blocks. Noticed by Sean Silva.
llvm-svn: 158359
2012-06-12 15:45:07 +00:00
Duncan Sands d7aeefebd6 Now that Reassociate's LinearizeExprTree can look through arbitrary expression
topologies, it is quite possible for a leaf node to have huge multiplicity, for
example: x0 = x*x, x1 = x0*x0, x2 = x1*x1, ... rapidly gives a value which is x
raised to a vast power (the multiplicity, or weight, of x).  This patch fixes
the computation of weights by correctly computing them no matter how big they
are, rather than just overflowing and getting a wrong value.  It turns out that
the weight for a value never needs more bits to represent than the value itself,
so it is enough to represent weights as APInts of the same bitwidth and do the
right overflow-avoiding dance steps when computing weights.  As a side-effect it
reduces the number of multiplies needed in some cases of large powers.  While
there, in view of external uses (eg by the vectorizer) I made LinearizeExprTree
static, pushing the rank computation out into users.  This is progress towards
fixing PR13021.

llvm-svn: 158358
2012-06-12 14:33:56 +00:00
Douglas Gregor 9b4f370095 When code completion walks the members of a protocol or interface,
make sure that we walk the definition. Fixes <rdar://problem/11427742>.

llvm-svn: 158357
2012-06-12 13:44:08 +00:00
Anna Zaks 2ae781f9e3 [analyzer] WWW: Shorten the menu title.
llvm-svn: 158356
2012-06-12 13:18:20 +00:00
Bill Wendling d4da16c193 Remove unused variable.
llvm-svn: 158353
2012-06-12 06:53:25 +00:00
Craig Topper db0fbf0a50 Add XOP permute intrinsics.
llvm-svn: 158351
2012-06-12 06:03:35 +00:00
Hal Finkel 060f5d2c4c Add two newlines in ParseSubtargetFeatures's debug output after the CPU is printed.
There is otherwise not a newline between the CPU name and the start of the next
pass's output which makes both difficult to read.

llvm-svn: 158350
2012-06-12 04:21:36 +00:00
Hal Finkel 59b0ee8a56 Reapply r158337, this time properly protect Darwin/PPC host CPU use with __ppc__.
Original commit message:
Move PPC host-CPU detection logic from PPCSubtarget into sys::getHostCPUName().

Both the new Linux functionality and the old Darwin functions have been moved.
This change also allows this information to be queried directly by clang and
other frontends (clang, for example, will now have real -mcpu=native support).

llvm-svn: 158349
2012-06-12 03:03:13 +00:00
Richard Smith 700537cddf If parsing a trailing-return-type fails, don't pretend we didn't have one at
all. Suppresses follow-on errors mentioned in PR13074.

llvm-svn: 158348
2012-06-12 01:51:59 +00:00
Dmitri Gribenko c69a5be0cc Correct comment. The return type was changed to const Type* in r123814. Patch by David Röthlisberger.
llvm-svn: 158347
2012-06-12 01:21:44 +00:00
Argyrios Kyrtzidis c6dc4d75fd Satisfy C++ aliasing rules, per suggestion by Chandler.
llvm-svn: 158346
2012-06-12 01:06:16 +00:00
Jakob Stoklund Olesen f8f128606c Revert r158337 "Move PPC host-CPU detection logic from PPCSubtarget into sys::getHostCPUName()."
This commit broke most of the PowerPC unit tests when running on
Intel/Apple.

llvm-svn: 158345
2012-06-12 00:58:40 +00:00
Dmitri Gribenko 19408a76a6 FileCheck docs: remove leftover HTML markup.
llvm-svn: 158344
2012-06-12 00:48:47 +00:00
Dmitri Gribenko 4425368365 Remove unused variable.
llvm-svn: 158343
2012-06-12 00:43:19 +00:00
Argyrios Kyrtzidis 8d19c86c9a For llvm::sys::ThreadLocalImpl instead of malloc'ing the platform-specific
thread local data, embed them in the class using a uint64_t and make sure
we get compiler errors if there's a platform where this is not big enough.

This makes ThreadLocal more safe for using it in conjunction with CrashRecoveryContext.

Related to crash in rdar://11434201.

llvm-svn: 158342
2012-06-12 00:21:31 +00:00
Jordan Rose 2fdc07ee89 Revert "[analyzer] Treat LValueBitCasts like regular pointer bit casts."
This does not actually give us the right behavior for reinterpret_cast
of references. Reverting so I can think about it some more.

This reverts commit 50a75a6e26a49011150067adac556ef978639fe6.

llvm-svn: 158341
2012-06-12 00:20:22 +00:00
Andrew Trick 3e465fb225 misched: When querying RegisterPressureTracker, always save current and max pressure.
llvm-svn: 158340
2012-06-11 23:42:23 +00:00
Andrew Trick d054bd833a misched: regpressure getMaxPressureDelta, revert accidental checkin.
llvm-svn: 158339
2012-06-11 23:42:20 +00:00