Eli Bendersky [Tue, 15 Jan 2013 23:22:09 +0000 (23:22 +0000)]
Optimize the memory usage of MC bundling, by creating a new type of fragment
into which we can emit single instructions without fixups (which is most
instructions). This is an optimization required because MCDataFragment
is prety large (240 bytes on x64), with no change in functionality.
For large programs, this reduces memory usage overhead required for bundling
by 40%.
To make the code as palatable as possible, the MCEncodedFragment interface was
further fragmented (no pun intended) and MCEncodedFragmentWithFixups is used
as the interface to work against when the user expects fixups. MCDataFragment
and MCRelaxableFragment implement this interface, while the new
MCCompactEncodedInstFragment implements MCEncodeFragment.
llvm-svn: 172572
David Greene [Tue, 15 Jan 2013 23:13:49 +0000 (23:13 +0000)]
Fix signed/unsigned Compare
Do some casting to avoid a signed/unsigned compare.
llvm-svn: 172571
David Greene [Tue, 15 Jan 2013 23:13:47 +0000 (23:13 +0000)]
Avoid unsigned Compare to int
Cast arithmetic results to avoid comparison of an unsigned to an int.
llvm-svn: 172570
Chad Rosier [Tue, 15 Jan 2013 23:07:53 +0000 (23:07 +0000)]
[ms-inline asm] Address the FIXME in AsmParser.cpp.
// FIXME: Constraints are hard coded to 'm', but we need an 'r'
// constraint for addressof. This needs to be cleaned up!
Test cases are already in place. Specifically,
clang/test/CodeGen/ms-inline-asm.c t15(), t16(), and t24().
llvm-svn: 172569
Eli Bendersky [Tue, 15 Jan 2013 22:59:42 +0000 (22:59 +0000)]
Refactor generic Asm directive parsing.
After discussing the refactoring with Jim and Daniel, the following changes were
made:
* All generic directive parsing is now done by AsmParser itself. The previous
division between it and GenericAsmParser did not have clear boundaries and
just produced unnatural code of GenericAsmParser juggling the internals of
AsmParser through an interface.
The division of responsibilities is now clear: target-specific directives,
other extensions (used by platform-specific parseres), and generic directives.
* Priority for directive parsing was reshuffled to ask extensions first and
check the generic directives later.
No change in functionality.
llvm-svn: 172568
Douglas Gregor [Tue, 15 Jan 2013 22:43:08 +0000 (22:43 +0000)]
When checking availability attributes for consistency between an
overriding and overridden method, allow the overridden method to have
a narrower contract (introduced earlier, deprecated/obsoleted later)
than the overriding method. Fixes <rdar://problem/
12992023>.
llvm-svn: 172567
Greg Clayton [Tue, 15 Jan 2013 22:13:13 +0000 (22:13 +0000)]
<rdar://problem/
13011717>
Fixed a compilation error where NULL was being assigned to a uint.
llvm-svn: 172566
David Greene [Tue, 15 Jan 2013 22:09:51 +0000 (22:09 +0000)]
Fix Casting
Use const_cast<> to avoid a cast-away-const error.
llvm-svn: 172565
David Greene [Tue, 15 Jan 2013 22:09:49 +0000 (22:09 +0000)]
Fix Casting
Use const_cast<> to avoid a cast-away-const error.
llvm-svn: 172564
David Greene [Tue, 15 Jan 2013 22:09:48 +0000 (22:09 +0000)]
Fix Casting
Use const_cast<> to avoid a cast-away-const error.
llvm-svn: 172563
David Greene [Tue, 15 Jan 2013 22:09:46 +0000 (22:09 +0000)]
Fix Casting
Use const_cast<> to avoid a cast-away-const error.
llvm-svn: 172562
David Greene [Tue, 15 Jan 2013 22:09:45 +0000 (22:09 +0000)]
Fix Cast
Properly use const_cast to fix a cast-away-const error.
llvm-svn: 172561
David Greene [Tue, 15 Jan 2013 22:09:43 +0000 (22:09 +0000)]
Fix Casting
Make the const_cast explicit to silence a compiler warning.
llvm-svn: 172560
David Greene [Tue, 15 Jan 2013 22:09:41 +0000 (22:09 +0000)]
Fix Const Cast
Do proper casting to avoid a cast-away-const error.
llvm-svn: 172559
David Greene [Tue, 15 Jan 2013 22:09:40 +0000 (22:09 +0000)]
Fix Cast
Avoid a cast-away-const error by properly using const_cast<>.
llvm-svn: 172558
David Greene [Tue, 15 Jan 2013 22:09:39 +0000 (22:09 +0000)]
Fix Cast Code
Eliminate a cast and resulting cast-qual warning by using a temporary
as the target of memcpy.
llvm-svn: 172557
Michael J. Spencer [Tue, 15 Jan 2013 22:00:16 +0000 (22:00 +0000)]
[Object][ELF] Fix -Wenum-compare.
llvm-svn: 172556
Aaron Ballman [Tue, 15 Jan 2013 21:59:46 +0000 (21:59 +0000)]
Typo correction; no functional change.
llvm-svn: 172555
Michael J. Spencer [Tue, 15 Jan 2013 21:13:14 +0000 (21:13 +0000)]
Trailing whitespace.
llvm-svn: 172554
Michael J. Spencer [Tue, 15 Jan 2013 21:13:02 +0000 (21:13 +0000)]
[ELF] Never allocate content to weak symbols as they may be merged away.
This is done by creating a new non-weak anonymous symbol and creating
an atom with content for that symbol. This is added after the weak symbol
so that they have the same address.
llvm-svn: 172553
Michael J. Spencer [Tue, 15 Jan 2013 21:12:45 +0000 (21:12 +0000)]
[ELF] Refactoring and style cleanup. No functionality change.
llvm-svn: 172552
Shuxin Yang [Tue, 15 Jan 2013 21:09:32 +0000 (21:09 +0000)]
1. Hoist minus sign as high as possible in an attempt to reveal
some optimization opportunities (in the enclosing supper-expressions).
rule 1. (-0.0 - X ) * Y => -0.0 - (X * Y)
if expression "-0.0 - X" has only one reference.
rule 2. (0.0 - X ) * Y => -0.0 - (X * Y)
if expression "0.0 - X" has only one reference, and
the instruction is marked "noSignedZero".
2. Eliminate negation (The compiler was already able to handle these
opt if the 0.0s are replaced with -0.0.)
rule 3: (0.0 - X) * (0.0 - Y) => X * Y
rule 4: (0.0 - X) * C => X * -C
if the expr is flagged "noSignedZero".
3.
Rule 5: (X*Y) * X => (X*X) * Y
if X!=Y and the expression is flagged with "UnsafeAlgebra".
The purpose of this transformation is two-fold:
a) to form a power expression (of X).
b) potentially shorten the critical path: After transformation, the
latency of the instruction Y is amortized by the expression of X*X,
and therefore Y is in a "less critical" position compared to what it
was before the transformation.
4. Remove the InstCombine code about simplifiying "X * select".
The reasons are following:
a) The "select" is somewhat architecture-dependent, therefore the
higher level optimizers are not able to precisely predict if
the simplification really yields any performance improvement
or not.
b) The "select" operator is bit complicate, and tends to obscure
optimization opportunities. It is btter to keep it as low as
possible in expr tree, and let CodeGen to tackle the optimization.
llvm-svn: 172551
Daniel Dunbar [Tue, 15 Jan 2013 20:52:09 +0000 (20:52 +0000)]
[Linker] Drop asserts that are embedded in cast<> and now checked by the verifier.
llvm-svn: 172550
Daniel Dunbar [Tue, 15 Jan 2013 20:52:06 +0000 (20:52 +0000)]
[IR] Add verification for module flags with the "require" behavior.
llvm-svn: 172549
Daniel Dunbar [Tue, 15 Jan 2013 20:33:56 +0000 (20:33 +0000)]
[driver/Darwin] Adjust SDKROOT handling code to not generate "-isysroot /".
llvm-svn: 172548
Daniel Jasper [Tue, 15 Jan 2013 18:56:19 +0000 (18:56 +0000)]
Add temporary option to invert the */& binding in a specific style.
This is temporarily necessary until styles are configurable through files
as it seems to be a contentious issue.
llvm-svn: 172546
Dmitri Gribenko [Tue, 15 Jan 2013 18:29:04 +0000 (18:29 +0000)]
Add a test for -Wsemicolon-before-method-body fixit
llvm-svn: 172545
Nadav Rotem [Tue, 15 Jan 2013 18:25:16 +0000 (18:25 +0000)]
LoopVectorizer cost model. Honor the user command line flag that selects the vectorization factor even if the target machine does not have any vector registers.
llvm-svn: 172544
David Greene [Tue, 15 Jan 2013 18:21:15 +0000 (18:21 +0000)]
Disable Uninitialized Use Warnings for Broken gcc Versions
Some versions of gcc accept unsupported -W flags and run just fine if
there are no warnings, but die with an unsupported flag error if a
warning is encountered. gcc 4.3 and gcc 4.4 both exhibit this
behavior for -Wno-maybe-uninitialized. Therefore, if the flag check
for -Wno-maybe-uninitialized succeeds, only use
-Wno-maybe-uninitialized if we are using gcc version 4.7 or greater.
Use -Wno-uninitialized otherwise.
llvm-svn: 172543
Howard Hinnant [Tue, 15 Jan 2013 17:22:03 +0000 (17:22 +0000)]
Optimize basic_ostream::write by having it call sputn instead of sputc.
llvm-svn: 172542
Evgeniy Stepanov [Tue, 15 Jan 2013 17:12:04 +0000 (17:12 +0000)]
[msan] Temporarily remove ICmpEQ tests.
They are failing on the bots.
llvm-svn: 172540
Evgeniy Stepanov [Tue, 15 Jan 2013 16:44:52 +0000 (16:44 +0000)]
[msan] Fix handling of equality comparison of pointer vectors.
Also improve test coveration of the handling of relational comparisons.
llvm-svn: 172539
Evgeniy Stepanov [Tue, 15 Jan 2013 16:43:00 +0000 (16:43 +0000)]
Allow vectors in CreatePointerCast.
Both underlying IR operations support vectors of pointers already.
llvm-svn: 172538
Manuel Klimek [Tue, 15 Jan 2013 16:41:02 +0000 (16:41 +0000)]
Do not traverse the break-state when we know we cannot break anyway.
This is an optimization that djasper spottet. For now, we do not format
anything after the first token that belongs to such an implicit string
literal. All our state is not made for handling that anyway, so we'll
revisit this if we find a problem.
llvm-svn: 172537
Manuel Klimek [Tue, 15 Jan 2013 15:50:27 +0000 (15:50 +0000)]
Fix formatting of preprocessor directives (incluces, warnings & errors).
Treat tokens inside <> for includes and everything from the second token
of a warning / error on as an implicit string literal, e.g. do not
change its whitespace at all.
Now correctly formats:
#include < path with space >
#error Leave all white!!!!! space* alone!
Note that for #error and #warning we still format the space up to the
first token of the text, so:
# error Text
will become
#error Text
llvm-svn: 172536
Evgeniy Stepanov [Tue, 15 Jan 2013 15:30:33 +0000 (15:30 +0000)]
Fix operand type conditions in one of ICmpInst constructors.
It was out of sync with the conditions in the other two constructors.
llvm-svn: 172535
Renato Golin [Tue, 15 Jan 2013 15:22:45 +0000 (15:22 +0000)]
Pattern-matched variables in post-inc-icmpzero.ll
Test was failing for clang-native-arm-cortex-a9 build-bot configuration.
The reason for the failure was the test was using hardcoded names.
The attached patch fixes this failure by replacing the hard-coded variables
names with pattern-matched variable names.
Patch by Manish Verma, ARM
llvm-svn: 172534
Daniel Jasper [Tue, 15 Jan 2013 14:27:39 +0000 (14:27 +0000)]
Improve operator kind detection in presence of comments.
We used to incorrectly identify some operators (*, &, +, -, etc.) if
there were comments around them.
Example:
Before: int a = /**/ - 1;
After: int a = /**/ -1;
llvm-svn: 172533
Kostya Serebryany [Tue, 15 Jan 2013 13:57:39 +0000 (13:57 +0000)]
[asan] enable asan_allocator2 by default on Linux. Will enable it on other platforms and remove the old one later, after additional testing. The new allocator is much faster and uses less memory
llvm-svn: 172531
Manuel Klimek [Tue, 15 Jan 2013 13:38:33 +0000 (13:38 +0000)]
Fixes various bugs around the keywords class, struct and union.
This switches to parsing record definitions only if we can clearly
identify them. We're specifically allowing common patterns for
visibility control through macros and attributes, but we cannot
currently fix all instances. This fixes all known bugs we have though.
Before:
static class A f() {
return g();
} int x;
After:
static class A f() {
return g();
}
int x;
llvm-svn: 172530
Dmitry Vyukov [Tue, 15 Jan 2013 12:57:02 +0000 (12:57 +0000)]
asan: fix standalone malloc implementation
llvm-svn: 172529
Alexander Kornienko [Tue, 15 Jan 2013 12:20:21 +0000 (12:20 +0000)]
Resolved merge error with r172323 (llvm::X -> X)
llvm-svn: 172528
Dmitry Vyukov [Tue, 15 Jan 2013 10:45:18 +0000 (10:45 +0000)]
asan: fix the constant for new allocator cache
llvm-svn: 172526
Michael J. Spencer [Tue, 15 Jan 2013 09:37:45 +0000 (09:37 +0000)]
Update CODE_OWNERS.TXT.
llvm-svn: 172525
Kostya Serebryany [Tue, 15 Jan 2013 09:03:23 +0000 (09:03 +0000)]
[sanitizer] hide PR_SET_NAME under an ifdef (for older kernels)
llvm-svn: 172523
Dmitry Vyukov [Tue, 15 Jan 2013 09:03:20 +0000 (09:03 +0000)]
asan: correct non-temporal prefetch for memory allocator
llvm-svn: 172522
Dmitry Vyukov [Tue, 15 Jan 2013 09:02:20 +0000 (09:02 +0000)]
asan: faster thead-local cache for memory allocator
llvm-svn: 172521
Dmitry Vyukov [Tue, 15 Jan 2013 08:51:10 +0000 (08:51 +0000)]
asan: fix lint warnings
llvm-svn: 172520
Dmitry Vyukov [Tue, 15 Jan 2013 08:33:41 +0000 (08:33 +0000)]
asan: fix bugs in the testlib
llvm-svn: 172519
Dmitry Vyukov [Tue, 15 Jan 2013 08:04:27 +0000 (08:04 +0000)]
asan: rename the file (it's not 64-bit specific anymore)
llvm-svn: 172518
Richard Smith [Tue, 15 Jan 2013 07:58:29 +0000 (07:58 +0000)]
Don't crash when binding a reference to a temporary pointer created from
resolving an overloaded function reference within an initializer list.
Previously we would try to resolve the overloaded function reference without
first stripping off the InitListExpr wrapper.
llvm-svn: 172517
Michael J. Spencer [Tue, 15 Jan 2013 07:53:22 +0000 (07:53 +0000)]
[ELF] Update for LLVM Object/ELF changes.
llvm-svn: 172516
Michael J. Spencer [Tue, 15 Jan 2013 07:44:25 +0000 (07:44 +0000)]
[Object][ELF] Simplify ELFObjectFile by using ELFType.
This simplifies the usage and implementation of ELFObjectFile by using ELFType
to replace:
<endianness target_endianness, std::size_t max_alignment, bool is64Bits>
This does complicate the base ELF types as they must now use template template
parameters to partially specialize for the 32 and 64bit cases. However these
are only defined once.
llvm-svn: 172515
Richard Smith [Tue, 15 Jan 2013 07:12:59 +0000 (07:12 +0000)]
PR14950: Fix out-of-bounds function parameter access in literal operator lookup.
llvm-svn: 172514
Michael J. Spencer [Tue, 15 Jan 2013 06:55:37 +0000 (06:55 +0000)]
[ELF] Replace [...] x_{begin,end}() with range<[...]> x().
llvm-svn: 172513
Michael J. Spencer [Tue, 15 Jan 2013 06:55:25 +0000 (06:55 +0000)]
[Core] Add iterator ranges.
This is based on code by Jeffrey Yasskin. It has been modified to compile
with MSVC and reformated to LLVM style.
llvm-svn: 172512
Michael J. Spencer [Tue, 15 Jan 2013 06:55:11 +0000 (06:55 +0000)]
[ELF] Fix use of LLVM RTTI.
llvm-svn: 172511
Richard Smith [Tue, 15 Jan 2013 06:49:38 +0000 (06:49 +0000)]
PR14918: Don't confuse braced-init-lists after template variable declarations
with function definitions.
We really should remove Parser::isDeclarationAfterDeclarator entirely, since
it's meaningless in C++11 (an open brace could be either a function definition
or an initializer, which is what it's trying to differentiate between). The
other caller of it happens to be correct right now...
llvm-svn: 172510
Douglas Gregor [Tue, 15 Jan 2013 06:45:29 +0000 (06:45 +0000)]
Add -fopenmp -cc1 option and wire it up to define _OPENMP, from Alexey Bataev!
llvm-svn: 172509
Michael J. Spencer [Tue, 15 Jan 2013 05:01:39 +0000 (05:01 +0000)]
[Support] Add LLVM_CONSTEXPR.
Marks a decl as constexpr if the compiler supports it.
llvm-svn: 172508
Shankar Easwaran [Tue, 15 Jan 2013 03:02:33 +0000 (03:02 +0000)]
remove const from FindByName
llvm-svn: 172507
Greg Clayton [Tue, 15 Jan 2013 02:59:24 +0000 (02:59 +0000)]
<rdar://problem/
13010909>
Don't accidentally sign extend unsigned bitfields.
llvm-svn: 172506
Jim Ingham [Tue, 15 Jan 2013 02:57:33 +0000 (02:57 +0000)]
Fix for the separation between -i and -u in expression.
llvm-svn: 172505
Richard Smith [Tue, 15 Jan 2013 02:48:13 +0000 (02:48 +0000)]
Fix behavior of [[gnu::]] function attributes. Per g++'s behavior, these
attributes appertain to a declaration, even though they would be much more
naturally modelled as appertaining to a function type. Previously, we would
try to distribute them from the declarator to the function type, then
reject them for being at an incorrect location. Now, we just distribute them
as far as the declarator; the existing attribute handling code can actually
apply them there just fine.
llvm-svn: 172504
Jim Ingham [Tue, 15 Jan 2013 02:47:48 +0000 (02:47 +0000)]
Separated the "expr --unwind-on-error" behavior into two parts, actual errors (i.e. crashes) which continue to be
controlled by the --unwind-on-error flag, and --ignore-breakpoint which separately controls behavior when a called
function hits a breakpoint. For breakpoints, we don't unwind, we either stop, or ignore the breakpoint, which makes
more sense.
Also make both these behaviors globally settable through "settings set".
Also handle the case where a breakpoint command calls code that ends up re-hitting the breakpoint. We were recursing
and crashing. Now we just stop without calling the second command.
<rdar://problem/
12986644>
<rdar://problem/9119325>
llvm-svn: 172503
Michael J. Spencer [Tue, 15 Jan 2013 02:00:59 +0000 (02:00 +0000)]
[docs] Add driver documentation.
This gives an overview of the driver and explains how to add options and driver flavors.
llvm-svn: 172502
Michael J. Spencer [Tue, 15 Jan 2013 02:00:48 +0000 (02:00 +0000)]
[docs] Update status.
llvm-svn: 172501
Argyrios Kyrtzidis [Tue, 15 Jan 2013 01:58:45 +0000 (01:58 +0000)]
[ADT/StringMap] Follow-up to r172455, use the correct constructor for setting the InitialSize,
previously it was calling the "StringMapImpl(unsigned itemSize)" constructor.
llvm-svn: 172500
Nadav Rotem [Tue, 15 Jan 2013 01:53:57 +0000 (01:53 +0000)]
LTO: Also init TTI for codegen passes.
llvm-svn: 172499
Daniel Dunbar [Tue, 15 Jan 2013 01:22:53 +0000 (01:22 +0000)]
[IR] Add verifier support for llvm.module.flags.
- Also, update the LangRef documentation on module flags to match the
implementation.
llvm-svn: 172498
Chad Rosier [Tue, 15 Jan 2013 01:21:53 +0000 (01:21 +0000)]
[driver] Warnings for warning options are handled by the frontend. The driver needs to process the
warning options to setup diagnostic state, but should not be emitting warnings as these would be
rudndant with what the frontend emits.
rdar://
13001556
llvm-svn: 172497
Jack Carter [Tue, 15 Jan 2013 01:08:02 +0000 (01:08 +0000)]
This patch fixes a Mips specific bug where
we need to generate a N64 compound relocation
R_MIPS_GPREL_32/R_MIPS_64/R_MIPS_NONE.
The bug was exposed by the SingleSourcetest case
DuffsDevice.c.
Contributer: Jack Carter
llvm-svn: 172496
Nick Kledzik [Tue, 15 Jan 2013 00:17:57 +0000 (00:17 +0000)]
Add new merge-by-content Merge attribute for use by anonymous
constants and string literals which the linker should coalesce.
llvm-svn: 172495
Jason Molenda [Tue, 15 Jan 2013 00:08:49 +0000 (00:08 +0000)]
Add a few other missing LOG_ types to set_logging() in RNBRemote.cpp;
document some simple bourne shell to re-generate these from the DNBDefs.h
header file in case this needs to be done again in the future.
llvm-svn: 172494
Enrico Granata [Tue, 15 Jan 2013 00:03:03 +0000 (00:03 +0000)]
Adding a test case for expression parser's support for Unicode strings. This is an expected failure for now
llvm-svn: 172493
Enrico Granata [Mon, 14 Jan 2013 23:53:26 +0000 (23:53 +0000)]
<rdar://problem/
12790664>
Single-character Unicode data formatters
llvm-svn: 172492
Eli Bendersky [Mon, 14 Jan 2013 23:43:18 +0000 (23:43 +0000)]
Now GenericAsmParser and AsmParser are no longer friends, GenericAsmParser can
simply use the getParser method from MCAsmParserExtension, working through the
MCAsmParser interface. There's no longer a need to overload that method to
cast it to the concrete AsmParser.
llvm-svn: 172491
Eli Bendersky [Mon, 14 Jan 2013 23:22:36 +0000 (23:22 +0000)]
Properly encapsulate additional methods and data from AsmParser.
This finally allows AsmParser to no longer list GenericAsmParser as a friend.
All member vars directly accessed by GenericAsmParser have been properly
encapsulated and exposed through the MCAsmParser interface. This reduces the
coupling between AsmParser and GenericAsmParser.
llvm-svn: 172490
Jakub Staszak [Mon, 14 Jan 2013 23:16:36 +0000 (23:16 +0000)]
Remove trailing spaces.
llvm-svn: 172489
Shuxin Yang [Mon, 14 Jan 2013 22:48:41 +0000 (22:48 +0000)]
This change is to implement following rules under the condition C_A and/or C_R
---------------------------------------------------------------------------
C_A: reassociation is allowed
C_R: reciprocal of a constant C is appropriate, which means
- 1/C is exact, or
- reciprocal is allowed and 1/C is neither a special value nor a denormal.
-----------------------------------------------------------------------------
rule1: (X/C1) / C2 => X / (C2*C1) (if C_A)
=> X * (1/(C2*C1)) (if C_A && C_R)
rule 2: X*C1 / C2 => X * (C1/C2) if C_A
rule 3: (X/Y)/Z = > X/(Y*Z) (if C_A && at least one of Y and Z is symbolic value)
rule 4: Z/(X/Y) = > (Z*Y)/X (similar to rule3)
rule 5: C1/(X*C2) => (C1/C2) / X (if C_A)
rule 6: C1/(X/C2) => (C1*C2) / X (if C_A)
rule 7: C1/(C2/X) => (C1/C2) * X (if C_A)
llvm-svn: 172488
Dmitri Gribenko [Mon, 14 Jan 2013 22:44:07 +0000 (22:44 +0000)]
Document that we should recognize attributes supported by gcc with C++11
[[gnu::...]] syntax
Pointed out by Richard Smith on the mailing list.
llvm-svn: 172487
Tobias Grosser [Mon, 14 Jan 2013 22:40:23 +0000 (22:40 +0000)]
clang-format goodness
llvm-svn: 172486
Richard Smith [Mon, 14 Jan 2013 22:39:08 +0000 (22:39 +0000)]
Refactor to call ActOnFinishFullExpr on every full expression. Teach
ActOnFinishFullExpr that some of its checks only apply to discarded-value
expressions. This adds missing checks for unexpanded variadic template
parameter packs to a handful of constructs.
llvm-svn: 172485
Chad Rosier [Mon, 14 Jan 2013 22:31:35 +0000 (22:31 +0000)]
[ms-inline asm] Extend support for parsing Intel bracketed memory operands that
have an arbitrary ordering of the base register, index register and displacement.
rdar://
12527141
llvm-svn: 172484
Dmitri Gribenko [Mon, 14 Jan 2013 22:18:18 +0000 (22:18 +0000)]
Improve r172468: const_cast is not needed here
llvm-svn: 172483
Nick Kledzik [Mon, 14 Jan 2013 22:10:22 +0000 (22:10 +0000)]
Fix shadowed variable warning
llvm-svn: 172482
Dmitri Gribenko [Mon, 14 Jan 2013 22:08:37 +0000 (22:08 +0000)]
Improve r172471: avoid all those extra casts on the lines nearby
llvm-svn: 172481
Bill Schmidt [Mon, 14 Jan 2013 22:04:38 +0000 (22:04 +0000)]
This patch addresses an incorrect transformation in the DAG combiner.
The included test case is derived from one of the GCC compatibility tests.
The problem arises after the selection DAG has been converted to type-legalized
form. The combiner first sees a 64-bit load that can be converted into a
pre-increment form. The original load feeds into a SRL that isolates the
upper 32 bits of the loaded doubleword. This looks like an opportunity for
DAGCombiner::ReduceLoadWidth() to replace the 64-bit load with a 32-bit load.
However, this transformation is not valid, as the replacement load is not
a pre-increment load. The pre-increment load produces an extra result,
which feeds a subsequent add instruction. The replacement load only has
one result value, and this value is propagated to all uses of the pre-
increment load, including the add. Because the add is looking for the
second result value as its operand, it ends up attempting to add a constant
to a token chain, resulting in a crash.
So the patch simply disables this transformation for any load with more than
two result values.
llvm-svn: 172480
Sean Callanan [Mon, 14 Jan 2013 21:45:38 +0000 (21:45 +0000)]
Once a function has been JIT-compiled once, don't
JIT it again.
llvm-svn: 172477
Michael Gottesman [Mon, 14 Jan 2013 21:44:30 +0000 (21:44 +0000)]
Multiprecision subtraction builtins.
We lower these into 2x chained usub.with.overflow intrinsics.
llvm-svn: 172476
Quentin Colombet [Mon, 14 Jan 2013 21:34:09 +0000 (21:34 +0000)]
Follow up of commit r172472.
Refactor the big if/else sequence into one string switch for ARM subtype selection.
llvm-svn: 172475
Dmitri Gribenko [Mon, 14 Jan 2013 21:23:37 +0000 (21:23 +0000)]
Improve r172464: const_cast is not needed if the variable is not const
llvm-svn: 172474
Quentin Colombet [Mon, 14 Jan 2013 21:07:43 +0000 (21:07 +0000)]
Complete the existing support of ARM v6m, v7m, and v7em, i.e., respectively cortex-m0, cortex-m3, and cortex-m4 on the backend side.
Adds new subtype values for the MachO format and use them when the related triple are set.
llvm-svn: 172472
David Greene [Mon, 14 Jan 2013 21:04:47 +0000 (21:04 +0000)]
Fix Casting
Fix a casting-away-const compiler warning.
llvm-svn: 172471
David Greene [Mon, 14 Jan 2013 21:04:45 +0000 (21:04 +0000)]
Fix Casting
Do proper casting to eliminate a const-away-cast compiler warning.
llvm-svn: 172470
David Greene [Mon, 14 Jan 2013 21:04:44 +0000 (21:04 +0000)]
Fix More Casts
Properly cast some more code that triggered cast-away-const errors.
llvm-svn: 172469
David Greene [Mon, 14 Jan 2013 21:04:42 +0000 (21:04 +0000)]
Fix Another Cast
Properly cast code to eliminate cast-away-const errors.
llvm-svn: 172468
David Greene [Mon, 14 Jan 2013 21:04:40 +0000 (21:04 +0000)]
Fix Casting Bug
Add a const version of getFpValPtr to avoid a cast-away-const warning.
llvm-svn: 172467
David Greene [Mon, 14 Jan 2013 21:04:38 +0000 (21:04 +0000)]
Fix More Casts
Fix another cast-away-const cast.
llvm-svn: 172466
David Greene [Mon, 14 Jan 2013 21:04:37 +0000 (21:04 +0000)]
Fix Casting
Stop a gcc warning about casting away const.
llvm-svn: 172465