Bill Wendling [Mon, 6 Jan 2014 00:43:20 +0000 (00:43 +0000)]
Refactor function that checks that __builtin_returnaddress's argument is constant.
This moves the check up into the parent class so that all targets can use it
without having to copy (and keep in sync) the same error message.
llvm-svn: 198579
Bill Wendling [Mon, 6 Jan 2014 00:43:09 +0000 (00:43 +0000)]
Remove a failing test to get the buildbots back to green.
llvm-svn: 198578
Bill Wendling [Mon, 6 Jan 2014 00:43:04 +0000 (00:43 +0000)]
Try to fix s390x build bot.
llvm-svn: 198577
Saleem Abdulrasool [Mon, 6 Jan 2014 00:15:00 +0000 (00:15 +0000)]
ARM: move ARMUnwindOp.h into Support
Move the ARM EHABI unwind opcode definitions from the ARM MCTargetDesc into LLVM
Support. This enables sharing of the definitions across the ARM target code as
well as llvm-readobj. This will allow implementation of the unwind decoding in
llvm-readobj.
llvm-svn: 198576
Aaron Ballman [Sun, 5 Jan 2014 21:08:29 +0000 (21:08 +0000)]
This helper method isn't needed, and it's unsafe for it to use StringRef in the first place. Replaced the unsafe code with the proper accessor.
llvm-svn: 198569
Benjamin Kramer [Sun, 5 Jan 2014 20:26:05 +0000 (20:26 +0000)]
SPARC: Make helper function static.
llvm-svn: 198567
Craig Topper [Sun, 5 Jan 2014 19:40:56 +0000 (19:40 +0000)]
Fix ModR/M byte output for 16-bit addressing modes (PR18220)
Add some tests to validate correct register selection, including a fix
to an existing test which was requiring the *wrong* output.
Patch from David Woodhouse.
llvm-svn: 198566
Venkatraman Govindaraju [Sun, 5 Jan 2014 19:25:57 +0000 (19:25 +0000)]
ELF relocation types for sparc.
llvm-svn: 198565
Craig Topper [Sun, 5 Jan 2014 19:25:13 +0000 (19:25 +0000)]
Remove opcode from MOV32r0 that I accidentally left when I converted it to Pseudo. Remove FIXME as well.
llvm-svn: 198564
Saleem Abdulrasool [Sun, 5 Jan 2014 16:36:37 +0000 (16:36 +0000)]
ARM: style changes to LDRD, STRD definition
Fix indentation, name registers similar to ARM ARM.
No functionality change!
llvm-svn: 198563
Elena Demikhovsky [Sun, 5 Jan 2014 14:21:07 +0000 (14:21 +0000)]
AVX-512: changed property name from "neverHasSideEffects=1" to "hasSideEffects=0", added this property to VMOVSS/VMOVSD;
Optimized a truncate pattern.
llvm-svn: 198562
Simon Atanasyan [Sun, 5 Jan 2014 13:40:27 +0000 (13:40 +0000)]
[Mips] Add support for DT_MIPS_RLD_MAP and DT_MIPS_PLTGOT dynamic
section tags to the llvm-readobj.
llvm-svn: 198561
Simon Atanasyan [Sun, 5 Jan 2014 13:40:17 +0000 (13:40 +0000)]
[Mips] Rename the test case input file. No functional changes.
llvm-svn: 198560
Daniel Jasper [Sun, 5 Jan 2014 13:23:23 +0000 (13:23 +0000)]
clang-format: Spacing inside enum braces.
Before (in Google style):
enum ShortEnum {A, B, C};
After:
enum ShortEnum { A, B, C };
llvm-svn: 198559
Daniel Jasper [Sun, 5 Jan 2014 12:38:10 +0000 (12:38 +0000)]
clang-format: Allow formatting short enums on a single line.
Before:
enum ShortEnum {
A,
B,
C
};
After:
enum ShortEnum { A, B, C };
This seems to be the predominant choice in LLVM/Clang as well as in
Google style.
llvm-svn: 198558
Elena Demikhovsky [Sun, 5 Jan 2014 10:46:09 +0000 (10:46 +0000)]
AVX-512: Added more intrinsics for convert and min/max.
Removed vzeroupper from AVX-512 mode - our optimization gude does not recommend to insert vzeroupper at all.
llvm-svn: 198557
Chandler Carruth [Sun, 5 Jan 2014 10:38:52 +0000 (10:38 +0000)]
[PM] Add a definition for the static PassID in the CallGraphAnalysis.
Missed this when adding the skeleton analysis. Caught by a build break
in the next patch I'm working on when trying to use the analysis.
llvm-svn: 198556
Chandler Carruth [Sun, 5 Jan 2014 09:14:53 +0000 (09:14 +0000)]
Add in a unittest for the one-use pattern matcher.
llvm-svn: 198552
Craig Topper [Sun, 5 Jan 2014 07:16:04 +0000 (07:16 +0000)]
Add the other form of movq xmm,xmm for the disassembler.
llvm-svn: 198551
Craig Topper [Sun, 5 Jan 2014 06:55:48 +0000 (06:55 +0000)]
Use patterns to remove some duplicate instructions.
llvm-svn: 198550
Alp Toker [Sun, 5 Jan 2014 06:38:57 +0000 (06:38 +0000)]
Fix 'declartion' typos
llvm-svn: 198549
Alp Toker [Sun, 5 Jan 2014 06:38:18 +0000 (06:38 +0000)]
Pre-declare '::type_info' in MicrosoftMode only, not MicrosoftExt
It was previously enabled in both but should only have been part of the drop-in
quirks mode that is 'MicrosoftMode' given that it's only useful for
compatibility with the Microsoft headers/runtime.
llvm-svn: 198548
Craig Topper [Sun, 5 Jan 2014 05:46:38 +0000 (05:46 +0000)]
Fix encoding for PUSH64i16. Add In64BitMode Predicate. Remove disassembler hack.
llvm-svn: 198547
Craig Topper [Sun, 5 Jan 2014 05:10:07 +0000 (05:10 +0000)]
Remove no longer needed x86 disassembler hack.
llvm-svn: 198546
Craig Topper [Sun, 5 Jan 2014 04:55:55 +0000 (04:55 +0000)]
Mark x86 _alt instructions as AsmParserOnly so they will be omitted from disassembler without string matches.
llvm-svn: 198545
Craig Topper [Sun, 5 Jan 2014 04:32:42 +0000 (04:32 +0000)]
Use new ForceDisassemble flag on the 2-byte forms of INC/DEC for 32-bit mode and remove disassmbler table emitter hack.
llvm-svn: 198544
Craig Topper [Sun, 5 Jan 2014 04:17:28 +0000 (04:17 +0000)]
Add a new x86 specific instruction flag to force some isCodeGenOnly instructions to go through to the disassembler tables without resorting to string matches. Apply flag to all _REV instructions.
llvm-svn: 198543
Alp Toker [Sun, 5 Jan 2014 04:17:27 +0000 (04:17 +0000)]
Tweak the parse recovery in r198540
Cover a hypothetical case when we might not have reached the final argument
declaration for some reason during recovery, and split out for readability.
llvm-svn: 198542
Chandler Carruth [Sun, 5 Jan 2014 03:28:29 +0000 (03:28 +0000)]
Add support to the pattern match library for matching NSW and NUW
instructions. I needed this for a quick experiment I was making, and
while I've no idea if that will ever get committed, I didn't want to
throw away the pattern match code and for anyone else to have to write
it again. I've added unittests to make sure this works correctly.
In fun news, this also uncovered the IRBuilder bug. Doh!
llvm-svn: 198541
Alp Toker [Sun, 5 Jan 2014 03:27:57 +0000 (03:27 +0000)]
Fix bungled parse recovery in K&R function declarations
void knrNoSemi(i) int i { }
Adherents of The C Programming Language unfortunate enough to miss a semicolon
as above would be met with a cascade of errors spanning the remainder of the
TU.
This patch introduces a beautiful parse error recovery, complete with helpful
FixIt to restore sanity.
Before (output redacted for brevity):
error: 'error' diagnostics seen but not expected:
File declarators.c Line 119: declaration does not declare a parameter
File declarators.c Line 123: declaration does not declare a parameter
File declarators.c Line 127: parameter named 'func_E12' is missing
File declarators.c Line 127: expected ';' at end of declaration
File declarators.c Line 133: parameter named 'func_E13' is missing
File declarators.c Line 133: expected ';' at end of declaration
File declarators.c Line 139: parameter named 'func_E14' is missing
File declarators.c Line 139: expected ';' at end of declaration
File declarators.c Line 145: parameter named 'func_E15' is missing
File declarators.c Line 145: expected ';' at end of declaration
File declarators.c Line 150: expected function body after function declarator
File declarators.c Line 119: declaration of 'enum E11' will not be visible outside of this function
File declarators.c Line 123: declaration of 'enum E12' will not be visible outside of this function
File declarators.c Line 133: ISO C forbids forward references to 'enum' types
File declarators.c Line 133: declaration of 'enum E13' will not be visible outside of this function
File declarators.c Line 139: ISO C forbids forward references to 'enum' types
File declarators.c Line 139: declaration of 'enum E14' will not be visible outside of this function
File declarators.c Line 145: ISO C forbids forward references to 'enum' types
File declarators.c Line 145: declaration of 'enum E15' will not be visible outside of this function
...
After:
declarators.c:103:24: error: expected ';' at end of declaration
void knrNoSemi(i) int i { }
^
;
Patch found in a sealed envelope dated 1978 with the message "Do not open until
January 2014"
llvm-svn: 198540
Alp Toker [Sun, 5 Jan 2014 03:27:11 +0000 (03:27 +0000)]
Parse: Token consumption modernization and loop de-nesting
Cleanup only.
llvm-svn: 198539
Chandler Carruth [Sun, 5 Jan 2014 03:22:33 +0000 (03:22 +0000)]
Fix a bug in IRBuilder that's been there for who knows how long. It
failed to correctly propagate the NUW and NSW flags to the constant
folder for two instructions. I've added a unittest to cover flag
propagation for the rest of the instructions and constant expressions.
llvm-svn: 198538
Bill Wendling [Sun, 5 Jan 2014 03:10:56 +0000 (03:10 +0000)]
Attempt to fix buildbots by XFAILing some architectures.
llvm-svn: 198537
Venkatraman Govindaraju [Sun, 5 Jan 2014 03:07:04 +0000 (03:07 +0000)]
Add lit.local.cfg for MC/Sparc
llvm-svn: 198536
Rui Ueyama [Sun, 5 Jan 2014 02:41:07 +0000 (02:41 +0000)]
Replace nested switch statements.
Differential Revision: http://llvm-reviews.chandlerc.com/D2501
llvm-svn: 198535
Chandler Carruth [Sun, 5 Jan 2014 02:23:11 +0000 (02:23 +0000)]
Use a shorter name for the IRBuilder member. This will help the tests
I'm adding next be a lot more readable.
llvm-svn: 198534
Venkatraman Govindaraju [Sun, 5 Jan 2014 02:13:48 +0000 (02:13 +0000)]
[Sparc] Add initial implementation of MC Code emitter for sparc.
llvm-svn: 198533
Chandler Carruth [Sun, 5 Jan 2014 02:07:20 +0000 (02:07 +0000)]
Simplify the PatternMatch unittest by giving it a module, function, and
basic block to hold instructions, and managing all of their lifetimes in
a fixture. This makes it easy to sink the expectations into the test
cases themselves which also makes things a bit more explicit and clearer
IMO.
llvm-svn: 198532
Bill Wendling [Sun, 5 Jan 2014 01:47:20 +0000 (01:47 +0000)]
Emit an error message if the value passed to __builtin_returnaddress isn't a constant
__builtin_returnaddress requires that the value passed into is be a constant.
However, at -O0 even a constant expression may not be converted to a constant.
Emit an error message intead of crashing.
llvm-svn: 198531
Craig Topper [Sun, 5 Jan 2014 01:35:51 +0000 (01:35 +0000)]
Mark the 64-bit x86 push/pop instructions as In64BitMode. Mark the corresponding 32-bit versions with the same encodings Not64BitMode. Remove hack from tablegen disassembler table emitter. Fix bad test.
llvm-svn: 198530
Craig Topper [Sun, 5 Jan 2014 01:34:12 +0000 (01:34 +0000)]
Don't use PrintFatalError(which calls exit) for 'Primary decode conflict'. Just skip emitting the table. This way the main function will delete the output file instead of it remaining empty and confusing dependency checks if build is invoked a second time.
llvm-svn: 198529
Nico Weber [Sun, 5 Jan 2014 00:37:45 +0000 (00:37 +0000)]
Add a FIXME.
llvm-svn: 198528
Alp Toker [Sat, 4 Jan 2014 22:47:48 +0000 (22:47 +0000)]
Add missed cleanup from r198456
All other uses of this macro in LLVM/clang have been moved to the function
definition so follow suite (and the usage advice) here too for consistency.
llvm-svn: 198516
Craig Topper [Sat, 4 Jan 2014 22:29:41 +0000 (22:29 +0000)]
Tag x86 move to/from debug/control registers with Not64BitMode/In64BitMode. Remove disassembler hack.
llvm-svn: 198515
Joerg Sonnenberger [Sat, 4 Jan 2014 17:43:00 +0000 (17:43 +0000)]
Switch to using C++ style casts.
llvm-svn: 198505
Alp Toker [Sat, 4 Jan 2014 17:00:45 +0000 (17:00 +0000)]
Revert "Fix PR18361: Invalidate LoopDispositions after LoopSimplify hoists things."
This commit was the source of crasher PR18384:
While deleting: label %for.cond127
An asserting value handle still pointed to this value!
UNREACHABLE executed at llvm/lib/IR/Value.cpp:671!
Reverting to get the builders green, feel free to re-land after fixing up.
(Renato has a handy isolated repro if you need it.)
This reverts commit r198478.
llvm-svn: 198503
Alp Toker [Sat, 4 Jan 2014 15:58:28 +0000 (15:58 +0000)]
Revert "ToolingTest.cpp: Fix r158592, runToolOnCode.FindsNoTopLevelDeclOnEmptyCode on msvc. LangOpts.MicrosoftExt still appends "class type_info;"."
type_info has been made an implicitly predeclared type in r198497 and will no
longer appear as a user-declared type so we can remove this old hack.
This reverts commit r158595.
llvm-svn: 198502
Alp Toker [Sat, 4 Jan 2014 15:25:02 +0000 (15:25 +0000)]
Move MS predefined type_info out of InitializePredefinedMacros
Instead of keeping it in amongst the macros, build the declaration at Sema init
the same way we do with other predeclared and builtin types.
In practice this means the declaration is marked implicit and therefore won't
show up as an unwanted user-declared type in tooling which has been a
frequently reported issue (though I haven't been able to cook up a test).
llvm-svn: 198497
Alp Toker [Sat, 4 Jan 2014 13:47:14 +0000 (13:47 +0000)]
Only mark dump() function definitions 'used' in debug builds
This has the dual effect of (1) enabling more dead-stripping in release builds
and (2) ensuring that debug helper functions aren't stripped away in debug
builds, as they're intended to be called from the debugger.
Note that the attribute is applied to definitions rather than declarations in
headers going forward because it's now conditional on NDEBUG:
/// \brief Mark debug helper function definitions like dump() that should not be
/// stripped from debug builds.
Requires corresponding macro added in LLVM r198456.
llvm-svn: 198489
Venkatraman Govindaraju [Sat, 4 Jan 2014 11:30:13 +0000 (11:30 +0000)]
[Sparc] Add the initial implementation of an asm parser for sparc/sparcv9.
llvm-svn: 198484
Yaron Keren [Sat, 4 Jan 2014 09:27:39 +0000 (09:27 +0000)]
80 cols fixes.
llvm-svn: 198482
Yaron Keren [Sat, 4 Jan 2014 08:56:00 +0000 (08:56 +0000)]
Implement the functions: clz, clzl, clzll, ctz, ctzl, and ctzll
for libcxx when compiled with Visual C++ on Win32 and Win64.
clang and gcc (MinGW) compilers provide these implementations themselves.
llvm-svn: 198481
Venkatraman Govindaraju [Sat, 4 Jan 2014 07:17:21 +0000 (07:17 +0000)]
[SparcV9]: Implement RETURNADDR and FRAMEADDR lowering in SPARC64.
Fixes PR18356.
llvm-svn: 198480
Argyrios Kyrtzidis [Sat, 4 Jan 2014 06:27:45 +0000 (06:27 +0000)]
Add an additional check in test/Sema/ext_vector_casts.c
llvm-svn: 198479
Andrew Trick [Sat, 4 Jan 2014 05:52:49 +0000 (05:52 +0000)]
Fix PR18361: Invalidate LoopDispositions after LoopSimplify hoists things.
getSCEV for an ashr instruction creates an intermediate zext
expression when it truncates its operand.
The operand is initially inside the loop, so the narrow zext
expression has a non-loop-invariant loop disposition.
LoopSimplify then runs on an outer loop, hoists the ashr operand, and
properly invalidate the SCEVs that are mapped to value.
The SCEV expression for the ashr is now an AddRec with the hoisted
value as the now loop-invariant start value.
The LoopDisposition of this wide value was properly invalidated during
LoopSimplify.
However, if we later get the ashr SCEV again, we again try to create
the intermediate zext expression. We get the same SCEV that we did
earlier, and it is still cached because it was never mapped to a
Value. When we try to create a new AddRec we abort because we're using
the old non-loop-invariant LoopDisposition.
I don't have a solution for this other than to clear LoopDisposition
when LoopSimplify hoists things.
I think the long-term strategy should be to perform LoopSimplify on
all loops before computing SCEV and before running any loop opts on
individual loops. It's possible we may want to rerun LoopSimplify on
individual loops, but it should rarely do anything, so rarely require
invalidating SCEV.
llvm-svn: 198478
Andrew Trick [Sat, 4 Jan 2014 05:52:45 +0000 (05:52 +0000)]
whitespace
llvm-svn: 198477
Ted Kremenek [Sat, 4 Jan 2014 05:52:11 +0000 (05:52 +0000)]
[analyzer] Remove IdempotentOperations checker.
This checker has not been updated to work with interprocedural analysis,
and actually contains both logical correctness issues but also
memory bugs. We can resuscitate it from version control once there
is focused interest in making it a real viable checker again.
llvm-svn: 198476
Craig Topper [Sat, 4 Jan 2014 05:09:27 +0000 (05:09 +0000)]
Remove JMP64pcrel32 (jmpq ). There are no tests for it. I'm pretty sure it won't be emitted correctly since it was set to NoImm. And I can't prove that gas accepts 'jmpq' with an immediate either. Remove the special case for it from the disassembler table generator.
llvm-svn: 198475
Argyrios Kyrtzidis [Sat, 4 Jan 2014 03:31:22 +0000 (03:31 +0000)]
[Sema] When checking if a bitcast is appropriate between vector types, take into
consideration the num-of-elements*width-of-element width.
Disallow casts when such width is not equal between the vector types otherwise
we may end up with an invalid LLVM bitcast.
rdar://
15722308.
llvm-svn: 198474
Richard Trieu [Sat, 4 Jan 2014 01:57:42 +0000 (01:57 +0000)]
Ignore qualified templated functions for -Winfinite-recursion. This treats
functions like Foo<5>::run() the same way as run<5>() for this warning.
llvm-svn: 198470
Jason Molenda [Sat, 4 Jan 2014 01:37:52 +0000 (01:37 +0000)]
Use Address::SetLoadAddress() instead of SectionLoadList::ResolveLoadAddress().
The former will set the Address object's offset to the load address value if
it is not present in any section; the latter will only set the Address object
if the load addr is contained in one of its sections.
<rdar://problem/
15135987>
llvm-svn: 198469
Joey Gouly [Sat, 4 Jan 2014 01:22:05 +0000 (01:22 +0000)]
[MachO] Add some missing NListTypes.
llvm-svn: 198468
Reid Kleckner [Fri, 3 Jan 2014 23:51:09 +0000 (23:51 +0000)]
Fix MSVC warning about missing return in DataLayout
llvm-svn: 198465
Reid Kleckner [Fri, 3 Jan 2014 23:42:00 +0000 (23:42 +0000)]
[ms-cxxabi] Improve vbtable name mangling accuracy
Summary:
This makes us more compatible with MSVC 2012+ and fixes PR17748 where we
would give two tables the same name.
Rather than doing a fresh depth-first traversal of the inheritance graph
for every record's vbtables, now we memoize vbtable paths for each
record. By doing memoization, we end up considering virtual bases of
subobjects that come later in the depth-first traversal. Where
previously we would have ignored a virtual base that we'd already seen,
we now consider it for name mangling purposes without emitting a
duplicate vbtable for it.
Reviewers: majnemer
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2509
llvm-svn: 198462
Adrian Prantl [Fri, 3 Jan 2014 23:34:30 +0000 (23:34 +0000)]
Debug info: Ensure that the last stop point in a function is still within
the lexical block formed by the compound statement that is the function
body.
rdar://problem/
15010825
llvm-svn: 198461
Joey Gouly [Fri, 3 Jan 2014 23:12:02 +0000 (23:12 +0000)]
[MachO] Begin to add some MachO specific File/Atoms, and add the start of
normalizedToAtoms.
llvm-svn: 198459
Marshall Clow [Fri, 3 Jan 2014 22:55:49 +0000 (22:55 +0000)]
Rename ___make_pair_return to __make_pair_return_impl; ___make_tuple_return to __make_tuple_return_impl; and ____iterator_traits to __iterator_traits_impl. Part of a campaign to remove > 2 underscores from libc++. No functionality change.
llvm-svn: 198457
Nico Weber [Fri, 3 Jan 2014 22:53:37 +0000 (22:53 +0000)]
Add a LLVM_DUMP_METHOD macro.
The motivation is to mark dump methods as used in debug builds so that they can
be called from lldb, but to not do so in release builds so that they can be
dead-stripped.
There's lots of potential follow-up work suggested in the thread
"Should dump methods be LLVM_ATTRIBUTE_USED only in debug builds?" on cfe-dev,
but everyone seems to agreen on this subset.
Macro name chosen by fair coin toss.
llvm-svn: 198456
Jack Carter [Fri, 3 Jan 2014 22:18:43 +0000 (22:18 +0000)]
[Mips]Work around MIPS linker issues exposed by commit r198087 until bug 18360 is resolved
llvm-svn: 198451
Jason Molenda [Fri, 3 Jan 2014 22:06:25 +0000 (22:06 +0000)]
Don't enforce ABI stack alignment rules on the sigtramp frame --
its stack frame is a constructed, fake thing that may not conform
correctly to these rules. This fixes a problem where lldb couldn't
backtrace past an asynchronous signal handler (_sigtramp) frame on
a stack on Mac OS X.
<rdar://problem/
15035673>
llvm-svn: 198450
Adrian Prantl [Fri, 3 Jan 2014 21:49:09 +0000 (21:49 +0000)]
FileCheck: Print a nice error message for missing closing ']' in regex vars.
llvm-svn: 198449
Jason Molenda [Fri, 3 Jan 2014 20:46:16 +0000 (20:46 +0000)]
Fix a mistake in the last change I made to ProcessMachCore.cpp.
<rdar://problem/
15745397>
llvm-svn: 198447
Aaron Ballman [Fri, 3 Jan 2014 20:10:54 +0000 (20:10 +0000)]
Refactored Builtin::Context::isPrintfLike and isScanfLike into a helper function. The implementations are identical, except for the format arguments being searched for.
No functional changes intended.
llvm-svn: 198446
Reid Kleckner [Fri, 3 Jan 2014 19:56:20 +0000 (19:56 +0000)]
Revert "For disassembly when adding a symbolic operand that is a C++ symbol name, also put the human readable name in a comment."
This reverts commit r198441.
This change doesn't build on Windows, and doesn't do the right thing on
Linux and other platforms that don't use a _Z prefix instead of __Z for
C++ names.
It also had no tests, so it wasn't clear how to fix it forward.
llvm-svn: 198445
Argyrios Kyrtzidis [Fri, 3 Jan 2014 19:53:09 +0000 (19:53 +0000)]
Fix 80 col violation.
llvm-svn: 198444
Rafael Espindola [Fri, 3 Jan 2014 19:42:04 +0000 (19:42 +0000)]
Fix typo.
Thanks to Owen Anderson for noticing it.
llvm-svn: 198443
Argyrios Kyrtzidis [Fri, 3 Jan 2014 19:39:23 +0000 (19:39 +0000)]
Pass the decl directly to the diagnostic, no need to call getDeclName().
llvm-svn: 198442
Kevin Enderby [Fri, 3 Jan 2014 19:33:09 +0000 (19:33 +0000)]
For disassembly when adding a symbolic operand that is a C++
symbol name, also put the human readable name in a comment.
Also fix a bug in LLVMDisasmInstruction() that was not flushing
the raw_svector_ostream for the disassembled instruction string
before copying it to the output buffer that was causing truncation
of the output.
rdar://
10173828
llvm-svn: 198441
Aaron Ballman [Fri, 3 Jan 2014 19:26:43 +0000 (19:26 +0000)]
Fixing a FIXME; the RetTy template parameter is always bool in practice, and so it has been removed. No functional changes intended.
llvm-svn: 198440
Rafael Espindola [Fri, 3 Jan 2014 19:22:05 +0000 (19:22 +0000)]
Update for llvm's DataLayout including mangling information.
llvm-svn: 198439
Rafael Espindola [Fri, 3 Jan 2014 19:21:54 +0000 (19:21 +0000)]
Make the llvm mangler depend only on DataLayout.
Before this patch any program that wanted to know the final symbol name of a
GlobalValue had to link with Target.
This patch implements a compromise solution where the mangler uses DataLayout.
This way, any tool that already links with Target (llc, clang) gets the exact
behavior as before and new IR files can be mangled without linking with Target.
With this patch the mangler is constructed with just a DataLayout and DataLayout
is extended to include the information the Mangler needs.
llvm-svn: 198438
Ana Pazos [Fri, 3 Jan 2014 19:20:31 +0000 (19:20 +0000)]
[AArch64][NEON] Added SXTL and SXTL2 instruction aliases
llvm-svn: 198437
David Blaikie [Fri, 3 Jan 2014 18:59:42 +0000 (18:59 +0000)]
Revert "Revert "Debug Info: Type Units: Simplify type hashing using IR-provided unique names.""
This reverts commit r198398, thus reapplying r198397.
I had accidentally introduced an endianness issue when applying the hash
to the type unit. Using support::ulittle64_t in the reinterpret_cast in
addDwarfTypeUnitType fixes this issue.
Original commit message:
Debug Info: Type Units: Simplify type hashing using IR-provided unique
names.
What's good for LTO metadata size problems ought to be good for non-LTO
debug info size too, so let's rely on the same uniqueness in both cases.
If it's insufficient for non-LTO for whatever reason (since we now won't
be uniquing CU-local types or any C types - but these are likely to not
be the most significant contributors to type bloat) we should consider a
frontend solution that'll help both LTO and non-LTO alike, rather than
using DWARF-level DIE-hashing that only helps non-LTO debug info size.
It's also much simpler this way and benefits C++ even more since we can
deduplicate lexically separate definitions of the same C++ type since
they have the same mangled name.
llvm-svn: 198436
Aaron Ballman [Fri, 3 Jan 2014 18:51:47 +0000 (18:51 +0000)]
Marked the default constructor as an LLVM_DELETED_FUNCTION.
llvm-svn: 198435
Joerg Sonnenberger [Fri, 3 Jan 2014 18:43:32 +0000 (18:43 +0000)]
Typo
llvm-svn: 198434
Aaron Ballman [Fri, 3 Jan 2014 18:42:48 +0000 (18:42 +0000)]
Removed one of the string versions of getQualifiedNameAsString, and switched over to using printQualifiedName where possible. No functional changes intended.
llvm-svn: 198433
Argyrios Kyrtzidis [Fri, 3 Jan 2014 18:32:18 +0000 (18:32 +0000)]
[objc] Refactor and improve functionality for the -Wunused-property-ivar warning.
- Remove the additions to ObjCMethodDecl & ObjCIVarDecl that were getting de/serialized and consolidate
all functionality for the checking for this warning in Sema::DiagnoseUnusedBackingIvarInAccessor
- Don't check immediately after the method body is finished, check when the @implementation is finished.
This is so we can see if the ivar was referenced by any other method, even if the method was defined after the accessor.
- Don't silence the warning if any method is called from the accessor silence it if the accessor delegates to another method via self.
rdar://
15727325
llvm-svn: 198432
Marshall Clow [Fri, 3 Jan 2014 18:21:14 +0000 (18:21 +0000)]
Patch by Howard. First part of fix for PR18218; add type traits needed to do the right thing. Fix the problems in PR18218 for isnan and pow - they also need to be applied to the other functions in <cmath>. Also, a drive-by fix for the test - now actually calls test_abs()
llvm-svn: 198431
Rafael Espindola [Fri, 3 Jan 2014 18:13:17 +0000 (18:13 +0000)]
Reformat the description strings. No functionality change.
llvm-svn: 198430
Aaron Ballman [Fri, 3 Jan 2014 18:10:25 +0000 (18:10 +0000)]
We haven't cared about VS 2005 in a long time, and VS 2003 in even longer.
llvm-svn: 198429
Aaron Ballman [Fri, 3 Jan 2014 17:59:55 +0000 (17:59 +0000)]
Fixed a FIXME; created a print method for Selectors that accepts a raw_ostream, and started using it in places it made sense.
No functional changes intended, just API cleanliness.
llvm-svn: 198428
Alexander Kornienko [Fri, 3 Jan 2014 17:24:20 +0000 (17:24 +0000)]
A follow-up to r198426: move AnalysisConsumer.h to include/clang/...
llvm-svn: 198427
Alexander Kornienko [Fri, 3 Jan 2014 17:23:10 +0000 (17:23 +0000)]
Make clang::ento::CreateAnalysisConsumer a part of a public interface of the static analyzer.
Summary:
This allows for a better alternative to the FrontendAction hack used in
clang-tidy in order to get static analyzer's ASTConsumer.
Reviewers: jordan_rose, krememek
Reviewed By: jordan_rose
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2505
llvm-svn: 198426
David Peixotto [Fri, 3 Jan 2014 17:20:01 +0000 (17:20 +0000)]
Fix loop rerolling pass failure with non-consant loop lower bound
The loop rerolling pass was failing with an assertion failure from a
failed cast on loops like this:
void foo(int *A, int *B, int m, int n) {
for (int i = m; i < n; i+=4) {
A[i+0] = B[i+0] * 4;
A[i+1] = B[i+1] * 4;
A[i+2] = B[i+2] * 4;
A[i+3] = B[i+3] * 4;
}
}
The code was casting the SCEV-expanded code for the new
induction variable to a phi-node. When the loop had a non-constant
lower bound, the SCEV expander would end the code expansion with an
add insted of a phi node and the cast would fail.
It looks like the cast to a phi node was only needed to get the
induction variable value coming from the backedge to compute the end
of loop condition. This patch changes the loop reroller to compare
the induction variable to the number of times the backedge is taken
instead of the iteration count of the loop. In other words, we stop
the loop when the current value of the induction variable ==
IterationCount-1. Previously, the comparison was comparing the
induction variable value from the next iteration == IterationCount.
This problem only seems to occur on 32-bit targets. For some reason,
the loop is not rerolled on 64-bit targets.
PR18290
llvm-svn: 198425
Aaron Ballman [Fri, 3 Jan 2014 16:23:46 +0000 (16:23 +0000)]
Simplifying the mutual exclusion check now that the diagnostics engine knows how to handle Attr objects directly. Updates an associated test case due to the attribute name being properly quoted again.
llvm-svn: 198424
Alexander Kornienko [Fri, 3 Jan 2014 15:34:40 +0000 (15:34 +0000)]
Clear the diagnostic buffer after flushing it.
Reviewers: klimek
Reviewed By: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2504
llvm-svn: 198423
Joey Gouly [Fri, 3 Jan 2014 15:11:57 +0000 (15:11 +0000)]
[OpenCL] Add test case for previous commit.
llvm-svn: 198422
Aaron Ballman [Fri, 3 Jan 2014 15:02:58 +0000 (15:02 +0000)]
Using the proper helper function instead of manually doing this work. No functional changes intended.
llvm-svn: 198421
Aaron Ballman [Fri, 3 Jan 2014 14:54:10 +0000 (14:54 +0000)]
Removing some more unnecessary manual quotes from diagnostics.
llvm-svn: 198420
Aaron Ballman [Fri, 3 Jan 2014 14:48:20 +0000 (14:48 +0000)]
Removing an unneeded typecast. getScopeRep() already returns a NestedNameSpecifier.
llvm-svn: 198419