Alp Toker [Sun, 6 Jul 2014 05:36:57 +0000 (05:36 +0000)]
Track changes from clang r212388
llvm-svn: 212391
Alp Toker [Sun, 6 Jul 2014 05:29:14 +0000 (05:29 +0000)]
Track changes from clang r212387, r212388
llvm-svn: 212390
Ehsan Akhgari [Sun, 6 Jul 2014 05:26:54 +0000 (05:26 +0000)]
Add support for nested blocks in Microsoft inline assembly
This fixes http://llvm.org/PR20204.
llvm-svn: 212389
Alp Toker [Sun, 6 Jul 2014 05:26:44 +0000 (05:26 +0000)]
Use non-intrusive refcounting for TargetOptions
llvm-svn: 212388
Alp Toker [Sun, 6 Jul 2014 05:26:07 +0000 (05:26 +0000)]
Use non-intrusive refcounting for LangOptions
This type is only refcounted in a couple of places so making ownership explicit
improves clarity.
llvm-svn: 212387
Alp Toker [Sun, 6 Jul 2014 05:14:24 +0000 (05:14 +0000)]
Constify a read-only parameter and give function a better name
This makes it clear that TargetInfo doesn't capture the LangOptions object,
rather uses it to apply adjustments.
llvm-svn: 212386
Alp Toker [Sun, 6 Jul 2014 04:27:03 +0000 (04:27 +0000)]
writeARCDiagsToPlist(): make sure all diag levels get handled
Handle 'remark' level diagnostics as warnings instead of supplemental notes,
and use a covered switch to ensure the mapping is kept up to date.
llvm-svn: 212385
Alp Toker [Sun, 6 Jul 2014 04:26:52 +0000 (04:26 +0000)]
Use PlistSupport in a few more places
Switch over LogDiagnosticPrinter and introduce an integer helper.
llvm-svn: 212384
Nico Weber [Sun, 6 Jul 2014 03:04:24 +0000 (03:04 +0000)]
clang-cl: /showIncludes output should go to stdout, not stderr. Fixes PR20217.
llvm-svn: 212383
Alp Toker [Sat, 5 Jul 2014 22:20:59 +0000 (22:20 +0000)]
Remove IntrusiveRefCntPtr::getPtr() function
It was deprecated in r212366 and all uses have been switched to get().
llvm-svn: 212382
Alp Toker [Sat, 5 Jul 2014 22:12:36 +0000 (22:12 +0000)]
Remove leftovers of '-arcmt-modify-in-memory' from r133315
llvm-svn: 212381
Matt Arsenault [Sat, 5 Jul 2014 21:16:43 +0000 (21:16 +0000)]
Use cast<> instead of dyn_cast + assert
llvm-svn: 212380
Matt Arsenault [Sat, 5 Jul 2014 21:16:40 +0000 (21:16 +0000)]
Fix grammar
llvm-svn: 212379
Saleem Abdulrasool [Sat, 5 Jul 2014 20:10:05 +0000 (20:10 +0000)]
CodeGen: add support for a few MSVC ARM intrinsics
This adds support for simple MSVC compatibility mode intrinsics. These
intrinsics are simple in that they are either directly passed through to the
annotated MSBuiltin intrinsic or they mirror existing GCC builtins.
llvm-svn: 212378
Saleem Abdulrasool [Sat, 5 Jul 2014 20:09:24 +0000 (20:09 +0000)]
ARM: mark matching ARM intrinsics as MSBuiltin
A number of the ARM intrinsics are aliased with alternative names in MSVC
compatibility mode. This change indicates those intrinsics to permit tablegen
to construct an appropriate list of MSBuiltins. With the corresponding change
in clang, these intrinsics can then be mapped from the frontend.
The tests to validate the intrinsics are aliased correctly will be added with
the corresponding clang change.
llvm-svn: 212377
Ehsan Akhgari [Sat, 5 Jul 2014 19:46:10 +0000 (19:46 +0000)]
Revert r212375 because of test failures
llvm-svn: 212376
Ehsan Akhgari [Sat, 5 Jul 2014 19:40:35 +0000 (19:40 +0000)]
Add a test case for the tilde operator in Microsoft inline assembly
llvm-svn: 212375
Simon Atanasyan [Sat, 5 Jul 2014 19:28:49 +0000 (19:28 +0000)]
[llvm-readobj] Fix output of MIPS GOT without local and global entries.
llvm-svn: 212374
Ehsan Akhgari [Sat, 5 Jul 2014 15:04:06 +0000 (15:04 +0000)]
Add a test case for the tilde operator in Microsoft inline assembly
llvm-svn: 212373
Rafael Espindola [Sat, 5 Jul 2014 11:39:02 +0000 (11:39 +0000)]
Update for llm api change.
llvm-svn: 212372
Rafael Espindola [Sat, 5 Jul 2014 11:38:52 +0000 (11:38 +0000)]
This only needs a StringRef. No functionality change.
llvm-svn: 212371
David Majnemer [Sat, 5 Jul 2014 06:12:30 +0000 (06:12 +0000)]
ADT: Add a drop_back() helper to ArrayRef
The slice(N, M) interface is powerful but not concise when wanting to
drop a few elements off of an ArrayRef, fix this by adding a drop_back
method.
llvm-svn: 212370
Alp Toker [Sat, 5 Jul 2014 03:08:06 +0000 (03:08 +0000)]
Track IntrusiveRefCntPtr::get() changes from LLVM r212366
llvm-svn: 212369
Alp Toker [Sat, 5 Jul 2014 03:06:05 +0000 (03:06 +0000)]
Track IntrusiveRefCntPtr::get() changes from LLVM r212366
llvm-svn: 212368
Alp Toker [Sat, 5 Jul 2014 03:04:33 +0000 (03:04 +0000)]
Track IntrusiveRefCntPtr::get() changes from LLVM r212366
llvm-svn: 212367
Alp Toker [Sat, 5 Jul 2014 03:03:21 +0000 (03:03 +0000)]
Deprecate IntrusiveRefCntPtr::getPtr() in favour of get()
This better aligns with other LLVM-specific and C++ standard library smart
pointer types.
In particular there are at least a few uses of intrusive refcounting in the
frontend where it's worth investigating std::shared_ptr as a more appropriate
alternative.
llvm-svn: 212366
David Majnemer [Sat, 5 Jul 2014 00:39:52 +0000 (00:39 +0000)]
MC: make MCSymbolData::dump work on const objects
This just lets us dump a const MCSymbolData object, no functionality
changed.
llvm-svn: 212365
Rafael Espindola [Sat, 5 Jul 2014 00:39:08 +0000 (00:39 +0000)]
Make a helper function static. No functionality change.
llvm-svn: 212364
David Majnemer [Fri, 4 Jul 2014 23:20:46 +0000 (23:20 +0000)]
MC: Correct comment in ExportSymbol
No functionality changed, just make it so that the code _could_ be
uncommented.
llvm-svn: 212363
David Majnemer [Fri, 4 Jul 2014 23:15:28 +0000 (23:15 +0000)]
MC: Cleanup COFFAsmParser::ParseSectionFlags
Switch a normal for-loop to a range-based for. No functionality changed.
llvm-svn: 212362
Rafael Espindola [Fri, 4 Jul 2014 22:44:18 +0000 (22:44 +0000)]
Make RecordStreamer.h private.
llvm-svn: 212361
David Majnemer [Fri, 4 Jul 2014 22:05:26 +0000 (22:05 +0000)]
IR: Fold away compares between GV GEPs and GVs
A GEP of a non-weak global variable will not be equivalent to another
non-weak global variable or a GEP of such a variable.
Differential Revision: http://reviews.llvm.org/D4238
llvm-svn: 212360
Saleem Abdulrasool [Fri, 4 Jul 2014 21:49:39 +0000 (21:49 +0000)]
CodeGen: add support for MSBuiltin aliases
This completes the infrastructure for the new MSBuiltin aliases in the
instruction definitions. These behave similar to the GCCBuiltin in that they
can be implicitly constructed without special handling unless needed.
With this change it is possible to annotate an LLVM intrinsic in the backend
instruction definitions and indicate it as a builtin in the Builtin*.def files
in clang via LANGBUILTIN. That will automatically pass through the instruction
much as a GCCBuiltin.
Note that there is no need for the special handling for ensuring that the
compatibility flag is enabled since the filtering on the LANGBUILTIN will
automatically prevent the intrinsic from bleeding into non-MS compatible
compiler invocations.
llvm-svn: 212359
Alp Toker [Fri, 4 Jul 2014 20:42:50 +0000 (20:42 +0000)]
Prune some ignored warning options
These are forms that have either slipped in without being requested for
compatibility or that GCC doesn't support in the first place.
llvm-svn: 212358
Rafael Espindola [Fri, 4 Jul 2014 20:05:56 +0000 (20:05 +0000)]
Fix a bug in the conversion to ErrorOr.
The regular end of the bitcode parsing is in the BitstreamEntry::EndBlock
case.
Should fix the LTO bootstrap on OS X (this function is only used by ld64).
llvm-svn: 212357
Rafael Espindola [Fri, 4 Jul 2014 20:02:42 +0000 (20:02 +0000)]
Revert "Convert a few std::strings to StringRef."
This reverts commit r212342.
We can get a StringRef into the current Record, but not one in the bitcode
itself since the string is compressed in it.
llvm-svn: 212356
Sanjay Patel [Fri, 4 Jul 2014 19:40:43 +0000 (19:40 +0000)]
fixed typos
llvm-svn: 212355
Rafael Espindola [Fri, 4 Jul 2014 19:31:27 +0000 (19:31 +0000)]
Ignore llvm specific symbols in the LTOModule.
These are the llvm.* globals and functions.
I don't think it is possible to test this directly since llvm-lto is not
a full linker and will not report duplicated symbols, but this fixes
bootstrap with gold and lto enabled.
llvm-svn: 212354
Ehsan Akhgari [Fri, 4 Jul 2014 19:22:29 +0000 (19:22 +0000)]
Fix up the test that expects the failure fixed in r212352
llvm-svn: 212353
Ehsan Akhgari [Fri, 4 Jul 2014 19:13:05 +0000 (19:13 +0000)]
Add support for parsing the not operator in Microsoft inline assembly
This fixes http://llvm.org/PR20202
llvm-svn: 212352
Rafael Espindola [Fri, 4 Jul 2014 19:08:22 +0000 (19:08 +0000)]
Ignore llvm.* globals.
It is not clear if llvm.global_ctors should or should not be in llvm.metadata,
but in practice it is not and we need to ignore it for LTO.
llvm-svn: 212351
Saleem Abdulrasool [Fri, 4 Jul 2014 18:42:25 +0000 (18:42 +0000)]
TableGen: introduce support for MSBuiltin
Add MSBuiltin which is similar in vein to GCCBuiltin. This allows for adding
intrinsics for Microsoft compatibility to individual instructions. This is
needed to permit the creation of ARM specific MSVC extensions.
This is not currently in use, and requires an associated change in clang to
enable use of the intrinsics defined by this new class. This merely sets the
LLVM portion of the infrastructure in place to permit the use of this
functionality. A separate set of changes will enable the new intrinsics.
llvm-svn: 212350
Rafael Espindola [Fri, 4 Jul 2014 18:40:36 +0000 (18:40 +0000)]
Implement LTOModule on top of IRObjectFile.
IRObjectFile provides all the logic for producing mangled names and getting
symbols from inline assembly.
LTOModule then adds logic for linking specific tasks, like constructing
llvm.compiler_user or extracting linker options from the bitcode.
The rule of the thumb is that IRObjectFile has the functionality that is
needed by both LTO and llvm-ar.
llvm-svn: 212349
Rafael Espindola [Fri, 4 Jul 2014 16:37:02 +0000 (16:37 +0000)]
Avoid mangling names twice. No functionality change.
llvm-svn: 212348
Rafael Espindola [Fri, 4 Jul 2014 15:58:00 +0000 (15:58 +0000)]
Mark intrinsic functions as llvm-specific.
llvm-svn: 212347
Daniel Sanders [Fri, 4 Jul 2014 15:21:53 +0000 (15:21 +0000)]
[mips][mips64r6] Set ELF e_flags for MIPS32r6/MIPS64r6. Also do MIPS-I to MIPS-V
Differential Revision: http://reviews.llvm.org/D4386
llvm-svn: 212346
Daniel Sanders [Fri, 4 Jul 2014 15:16:14 +0000 (15:16 +0000)]
[mips] Add tests for the 'ret', 'call', and 'indirectbr' LLVM IR instruction.
Summary:
The tests in this directory are intended to test a single IR instruction
with as few dependencies on other instructions as possible. The aim is to
be very confident that each LLVM-IR instruction is implemented correctly and
with the optimal sequence of instructions, as well as to make it easy to tell
what is tested, and make it easier to bring up new ISA revisions in the
future. This gives us a good foundation on which to test bigger things.
These particular tests will allow testing that MIPS32r6/MIPS64r6 generate
the correct return instruction for returns, calls, and indirect branches.
This will be a bit tricky since the assembly text is identical but the
instruction is actually different. On MIPS32r6/MIPS64r6 'jr $rs' has been
removed in favour of the equivalent 'jalr $zero, $rs'. 'jr $rs' remains as
an alias for 'jalr $zero, $rs'.
Differential Revision: http://reviews.llvm.org/D4266
llvm-svn: 212345
Rafael Espindola [Fri, 4 Jul 2014 15:03:17 +0000 (15:03 +0000)]
Don't include llvm.metadata variables in archive symbol tables.
llvm-svn: 212344
Rafael Espindola [Fri, 4 Jul 2014 14:19:41 +0000 (14:19 +0000)]
Change LTOModule`s getTargetTriple and setTargetTriple to use c++ types.
llvm-svn: 212343
Rafael Espindola [Fri, 4 Jul 2014 14:12:46 +0000 (14:12 +0000)]
Convert a few std::strings to StringRef.
llvm-svn: 212342
Rafael Espindola [Fri, 4 Jul 2014 13:52:01 +0000 (13:52 +0000)]
Convert these functions to use ErrorOr.
llvm-svn: 212341
Rafael Espindola [Fri, 4 Jul 2014 13:30:13 +0000 (13:30 +0000)]
Remove unused old-style error handling.
If needed, an ErrorOr should be used.
llvm-svn: 212340
Simon Atanasyan [Fri, 4 Jul 2014 12:37:04 +0000 (12:37 +0000)]
[Driver][Mips] Support one more MIPS CPU name - octeon.
llvm-svn: 212339
Simon Atanasyan [Fri, 4 Jul 2014 12:36:56 +0000 (12:36 +0000)]
[Driver][Mips] Support more MIPS CPU names: mips1 - mips5.
llvm-svn: 212338
Benjamin Kramer [Fri, 4 Jul 2014 12:36:05 +0000 (12:36 +0000)]
GlobalDCE: Delete available_externally initializers if it allows removing the value the initializer is referring to.
This is useful for functions that are not actually available externally but
referenced by a vtable of some kind. Clang emits functions like this for the MS
ABI.
PR20182.
llvm-svn: 212337
Simon Atanasyan [Fri, 4 Jul 2014 12:08:03 +0000 (12:08 +0000)]
Remove redundant "Standard: Cpp11" tag. The LLVM style has used the
Cpp11 standard since r202637.
llvm-svn: 212336
NAKAMURA Takumi [Fri, 4 Jul 2014 11:58:03 +0000 (11:58 +0000)]
llvm/test/CodeGen/XCore/dwarf_debug.ll: Fix not to be affected by *-win32.
llvm-svn: 212335
NAKAMURA Takumi [Fri, 4 Jul 2014 11:55:40 +0000 (11:55 +0000)]
llvm/test/CodeGen/X86/vector-gep.ll: Appease to add -mtriple=i686-linux.
This doesn't pass if stack alignment is not 16, like cygming, *bsd.
llvm-svn: 212334
Tim Northover [Fri, 4 Jul 2014 10:58:05 +0000 (10:58 +0000)]
ARM: when falling back to scattered relocs, keep the type.
The linker relies on relocation type info (e.g. is it a branch?) to perform the
correct actions, so we should keep that even when we end up using a scattered
relocation for whatever reason.
rdar://problem/
17553104
llvm-svn: 212333
Tim Northover [Fri, 4 Jul 2014 10:57:56 +0000 (10:57 +0000)]
llvm-readobj: fix MachO relocatoin printing a bit.
There were two issues here:
1. At the very least, scattered relocations cannot use the same code to
determine the corresponding symbol being referred to. For some reason we
pretend there is no symbol, even when one actually exists in the symtab, so to
match this behaviour getRelocationSymbol should simply return symbols_end for
scattered relocations.
2. Printing "-" when we can't get a symbol (including the scattered case, but
not exclusively), isn't that helpful. In both cases there *is* interesting
information in that field, so we should print it. As hex will do.
Small part of rdar://problem/
17553104
llvm-svn: 212332
Benjamin Kramer [Fri, 4 Jul 2014 10:22:21 +0000 (10:22 +0000)]
InstCombine: Strength reduce sadd.with.overflow into a regular nsw add if we can prove that it cannot overflow.
PR20194
llvm-svn: 212331
Daniel Sanders [Fri, 4 Jul 2014 10:08:27 +0000 (10:08 +0000)]
[mips][mips64r6] Correct the encoding of dmuh, dmuhu, dmul, and dmulu.
We have detected a documentation bug in the encoding tables of the released
MIPS64r6 specification that has resulted in the wrong encodings being used for
these instructions in LLVM. This commit corrects them.
llvm-svn: 212330
Evgeniy Stepanov [Fri, 4 Jul 2014 10:07:39 +0000 (10:07 +0000)]
[msan] Reformat one source file.
llvm-svn: 212329
Sylvestre Ledru [Fri, 4 Jul 2014 09:00:35 +0000 (09:00 +0000)]
Phabricator doc: Explicit the fact that the patch needs to be there before the commit
llvm-svn: 212328
Sylvestre Ledru [Fri, 4 Jul 2014 08:59:41 +0000 (08:59 +0000)]
gcc comptability: silent -fdefer-pop & -fno-defer-pop
Reviewers: rafael, rnk
Reviewed By: rnk
Subscribers: rnk, cfe-commits
Differential Revision: http://reviews.llvm.org/D4357
llvm-svn: 212327
Chandler Carruth [Fri, 4 Jul 2014 08:39:30 +0000 (08:39 +0000)]
[x86] Relax the line in this check to pacify build bots.
I still don't love testing the comments, but its the only sane way to
check shuffle instructions...
llvm-svn: 212326
Chandler Carruth [Fri, 4 Jul 2014 08:19:37 +0000 (08:19 +0000)]
[x86] Move some check lines to be slightly easier for me to find.
(meant to put this cleanup in the previous patch, sorry)
llvm-svn: 212325
Chandler Carruth [Fri, 4 Jul 2014 08:11:49 +0000 (08:11 +0000)]
[x86] Generalize BuildVectorSDNode::getConstantSplatValue to work for
any constant, constant FP, or undef splat and to tolerate any undef
lanes in a splat, then replace all uses of isSplatVector in X86's
lowering with it.
This fixes issues where undef lanes in an otherwise splat vector would
prevent the splat logic from firing. It is a touch more awkward to use
this interface, but it is much more accurate. Suggestions for better
interface structuring welcome.
With this fix, the code generated with the widening legalization
strategy for widen_cast-4.ll is *dramatically* improved as the special
lowering strategies for a v16i8 SRA kick in even though the high lanes
are undef.
We also get a slightly different choice for broadcasting an aligned
memory location, and use vpshufd instead of vbroadcastss. This looks
like a minor win for pipelining and domain crossing, but a minor loss
for the number of micro-ops. I suspect its a wash, but folks can easily
tweak the lowering if they want.
llvm-svn: 212324
Chandler Carruth [Fri, 4 Jul 2014 08:11:38 +0000 (08:11 +0000)]
Add an explicit bool operator to SDValue to make it easier to test for
a non-null node. In particular, this makes it easier to use condition
variables with SDValues, etc.
llvm-svn: 212323
Kostya Serebryany [Fri, 4 Jul 2014 07:30:34 +0000 (07:30 +0000)]
[sanitizer] support c11 aligned_alloc, Linux only for now
llvm-svn: 212322
Alexey Volkov [Fri, 4 Jul 2014 07:14:56 +0000 (07:14 +0000)]
[X86] Limit maximum nop length on Silvermont
Silvermont can only decode one instruction per cycle if the instruction exceeds 8 bytes.
Also in Silvermont instructions with more than 3 prefixes will cause 3 cycle penalty.
Maximum nop length is limited to 7 bytes when used for padding on Silvermont.
For other x86 processors max nop length remains unchanged 15 bytes.
Differential Revision: http://reviews.llvm.org/D4374
llvm-svn: 212321
Todd Fiala [Fri, 4 Jul 2014 06:58:01 +0000 (06:58 +0000)]
Windows build fixes and removal of endlessly recursive termination function.
This change removes the ScriptInterpreter::TerminateInterpreter() call which
ended up endlessly calling itself as things currently stand. It also cleans
up some other Windows-related cmake changes.
See http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-
20140630/011544.html
for more details.
Change by Zachary Turner
llvm-svn: 212320
Todd Fiala [Fri, 4 Jul 2014 06:43:47 +0000 (06:43 +0000)]
Fix Windows build when python is not explicitly enabled
Currently Windows disables Python builds by default. This
change ensures we don't process the scripts dir when we're
on Windows unless we're explicitly enabling python, which
prevents a build error.
Change by Deepak Panickal
llvm-svn: 212319
Robert Lytton [Fri, 4 Jul 2014 06:38:22 +0000 (06:38 +0000)]
XCore target: remove incorrect DebugLoc entries from prologue
Summary: This was causing the prologue_end to be incorrectly positioned.
Differential Revision: http://reviews.llvm.org/D4122
llvm-svn: 212318
Todd Fiala [Fri, 4 Jul 2014 06:09:04 +0000 (06:09 +0000)]
Fix OptionDefinition break from r212290.
Fixes some structure definitions in CommandObjectType
that needed to be adjusted for a new OptionDefinition
field.
llvm-svn: 212317
NAKAMURA Takumi [Fri, 4 Jul 2014 05:11:55 +0000 (05:11 +0000)]
Let test/Unit/lit.cfg add config.shlibdir to $PATH on DLL platforms like cygming.
This makes unittests run with BUILD_SHARED_LIBS on DLL platforms.
llvm-svn: 212316
NAKAMURA Takumi [Fri, 4 Jul 2014 04:45:40 +0000 (04:45 +0000)]
[CMake] Introduce LLVM_ENABLE_PLUGINS as an internal option. BUILD_SHARED_LIBS may not control enable/disable plugins.
FIXME: Make this configurable.
FIXME: "ENABLE_SHARED" doesn't make sense, since it is used just for plugins. We may rename it.
I introduced config.enable_shared in r120273.
llvm-svn: 212315
NAKAMURA Takumi [Fri, 4 Jul 2014 04:23:26 +0000 (04:23 +0000)]
[CMake] Introduce LLVM_SHLIB_OUTPUT_INTDIR.
For now, its user is configure_lit_site_cfg().
llvm-svn: 212314
NAKAMURA Takumi [Fri, 4 Jul 2014 04:23:15 +0000 (04:23 +0000)]
[CMake] Fix set_output_directory to do nothing if *_OUTPUT_INTDIR was not given.
llvm-svn: 212313
NAKAMURA Takumi [Fri, 4 Jul 2014 04:20:49 +0000 (04:20 +0000)]
Trailing linefeed
llvm-svn: 212312
Alexey Bataev [Fri, 4 Jul 2014 04:06:11 +0000 (04:06 +0000)]
Fixed test CodeGen/captured-statements.c for powerpc64-linux.
llvm-svn: 212311
Alp Toker [Fri, 4 Jul 2014 02:01:54 +0000 (02:01 +0000)]
Fix prefix comparison from r212308
llvm-svn: 212310
Eric Christopher [Fri, 4 Jul 2014 01:55:26 +0000 (01:55 +0000)]
Move function dependent resetting of a subtarget variable out of the
subtarget. This involved having the movt predicate take the current
function - since we care about size in instruction selection for
whether or not to use movw/movt take the function so we can check
the attributes. This required adding the current MachineFunction to
FastISel and propagating through.
llvm-svn: 212309
Alp Toker [Fri, 4 Jul 2014 00:58:41 +0000 (00:58 +0000)]
Sink undesirable LTO functions into the old C API
We want to encourage users of the C++ LTO API to reuse memory buffers instead
of repeatedly opening and reading the same file contents.
This reverts commit r212305 and implements a tidier scheme.
llvm-svn: 212308
David Majnemer [Fri, 4 Jul 2014 00:23:39 +0000 (00:23 +0000)]
InstSimplify: Fix a bug when INT_MIN is in a sdiv
When INT_MIN is the numerator in a sdiv, we would not properly handle
overflow when calculating the bounds of possible values; abs(INT_MIN) is
not a meaningful number.
Instead, check and handle INT_MIN by reasoning that the largest value is
INT_MIN/-2 and the smallest value is INT_MIN.
This fixes PR20199.
llvm-svn: 212307
Nick Kledzik [Fri, 4 Jul 2014 00:11:09 +0000 (00:11 +0000)]
[mach-o] Add parsing of arm/thumb relocations
This converts the very complicated mach-o arm
relocations into the simple Reference Kinds in lld.
The next patch will use the internal Reference kinds
to fix up arm/thumb code.
llvm-svn: 212306
Peter Collingbourne [Thu, 3 Jul 2014 23:49:28 +0000 (23:49 +0000)]
Modify LTOModule::isTargetMatch to take a StringRef instead of a MemoryBuffer.
llvm-svn: 212305
Zachary Turner [Thu, 3 Jul 2014 23:44:14 +0000 (23:44 +0000)]
Fix -Wnull-conversion warning.
llvm-svn: 212304
Peter Collingbourne [Thu, 3 Jul 2014 23:28:03 +0000 (23:28 +0000)]
gold plugin: move target initialization to the top of the onload function.
On at least my machine, ar does not register an all symbols read hook (which
previously triggered target initialization), but it does register a claim
files hook, which depends on the targets being initialized.
Differential Revision: http://reviews.llvm.org/D4372
llvm-svn: 212303
Peter Collingbourne [Thu, 3 Jul 2014 23:28:00 +0000 (23:28 +0000)]
LTO: rename the various makeLTOModule overloads.
This rename makes it easier to identify the specific overload being called
in each particular case and makes future refactorings easier.
Differential Revision: http://reviews.llvm.org/D4370
llvm-svn: 212302
Rafael Espindola [Thu, 3 Jul 2014 23:03:50 +0000 (23:03 +0000)]
Move createIRObjectFile to the IRObjectFile class and return the concrete type.
llvm-svn: 212301
Chandler Carruth [Thu, 3 Jul 2014 22:57:44 +0000 (22:57 +0000)]
[x86] Clarify that this lowering only applies to vectors and is only
used when we have SSE2.
llvm-svn: 212300
Rafael Espindola [Thu, 3 Jul 2014 22:43:03 +0000 (22:43 +0000)]
Use std::unique_ptr to manage memory. No functionality change.
llvm-svn: 212299
Eric Christopher [Thu, 3 Jul 2014 22:24:54 +0000 (22:24 +0000)]
Temporarily revert "Don't try to construct debug LexicalScopes hierarchy for functions that do not have top level debug information." as it appears to be breaking some LTO constructs.
This reverts commit r212203.
llvm-svn: 212298
Eric Christopher [Thu, 3 Jul 2014 22:24:49 +0000 (22:24 +0000)]
Remove caching of the target machine and initialization of the
subtarget from ARMISelDAGtoDAG. The former is unnecessary and the
latter is initialized on each runOnMachineFunction.
llvm-svn: 212297
Andrea Di Biagio [Thu, 3 Jul 2014 22:24:18 +0000 (22:24 +0000)]
[CostModel][x86] Improved cost model for alternate shuffles.
This patch:
1) Improves the cost model for x86 alternate shuffles (originally
added at revision 211339);
2) Teaches the Cost Model Analysis pass how to analyze alternate shuffles.
Alternate shuffles are a special kind of blend; on x86, we can often
easily lowered alternate shuffled into single blend
instruction (depending on the subtarget features).
The existing cost model didn't take into account subtarget features.
Also, it had a couple of "dead" entries for vector types that are never
legal (example: on x86 types v2i32 and v2f32 are not legal; those are
always either promoted or widened to 128-bit vector types).
The new x86 cost model takes into account what target features we have
before returning the shuffle cost (i.e. the number of instructions
after the blend is lowered/expanded).
This patch also teaches the Cost Model Analysis how to identify and analyze
alternate shuffles (i.e. 'SK_Alternate' shufflevector instructions):
- added function 'isAlternateVectorMask';
- added some logic to check if an instruction is a alternate shuffle and, in
case, call the target specific TTI to get the corresponding shuffle cost;
- added a test to verify the cost model analysis on alternate shuffles.
llvm-svn: 212296
Kevin Enderby [Thu, 3 Jul 2014 21:51:07 +0000 (21:51 +0000)]
Add the -just-symbol-name (aka -j) flag to llvm-nm to just print the
symbol’s name. On darwin the -j flag is used (often in combinations
with other flags) to produce a complete list of symbol names which
than can then be reorder and used with ld(1)’s -order_file.
llvm-svn: 212294
Andrea Di Biagio [Thu, 3 Jul 2014 21:51:06 +0000 (21:51 +0000)]
[X86] Add ISel patterns to select 'f32_to_f16' and 'f16_to_f32' dag nodes.
This patch adds tablegen patterns to select F16C float-to-half-float
conversion instructions from 'f32_to_f16' and 'f16_to_f32' dag nodes.
If the target doesn't have F16C, then 'f32_to_f16' and 'f16_to_f32'
are expanded into library calls.
llvm-svn: 212293
Rafael Espindola [Thu, 3 Jul 2014 21:34:25 +0000 (21:34 +0000)]
Expand the note about llvm-ar now that inline asm works.
llvm-svn: 212292
Fariborz Jahanian [Thu, 3 Jul 2014 21:06:20 +0000 (21:06 +0000)]
Make a small crash preventing change.
llvm-svn: 212291