oota-llvm.git
10 years agoTry to fix linux build after r198136.
Nico Weber [Sat, 28 Dec 2013 23:39:49 +0000 (23:39 +0000)]
Try to fix linux build after r198136.

$ needs to be written $$ in makefiles, but not in cmakefiles.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198137 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoEXPORTED_SYMBOL_FILE support for cmake
Nico Weber [Sat, 28 Dec 2013 23:31:44 +0000 (23:31 +0000)]
EXPORTED_SYMBOL_FILE support for cmake

The cmake build didn't support EXPORTED_SYMBOL_FILE. Instead, it had a
Windows-only implementation in tools/lto/CMakeLists.txt, a linux-only
implementation in tools/gold/CMakeLists.txt, and a darwin-only implementation
in tools/clang/tools/libclang/CMakeLists.txt.

This attempts to consolidate these one-offs into a single place. Clients can now
just set LLVM_EXPORTED_SYMBOL_FILE and things (hopefully) Just Work, like in
the make build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198136 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove windows newlines.
Nico Weber [Sat, 28 Dec 2013 23:26:51 +0000 (23:26 +0000)]
Remove windows newlines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198135 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCodeGen: silence a C++11 feature warning
Saleem Abdulrasool [Sat, 28 Dec 2013 22:47:55 +0000 (22:47 +0000)]
CodeGen: silence a C++11 feature warning

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198133 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM IAS: handle errors more appropriately
Saleem Abdulrasool [Sat, 28 Dec 2013 22:47:53 +0000 (22:47 +0000)]
ARM IAS: handle errors more appropriately

Directive parsers must return false if the target assembler is interested in
handling the directive.  The Error member function returns true always.  Using
the 'return Error()' pattern would incorrectly indicate to the general parser
that the target was not interested in the directive, when in reality it simply
encountered a badly formed directive or some other error.  This corrects the
behaviour to ensure that the parser behaves appropriately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198132 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUninitialized variable (in never taken path) after factoring.
Andrew Trick [Sat, 28 Dec 2013 22:25:57 +0000 (22:25 +0000)]
Uninitialized variable (in never taken path) after factoring.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198131 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoNew machine model for cortex-a9. Schedule for resources and latency.
Andrew Trick [Sat, 28 Dec 2013 21:57:05 +0000 (21:57 +0000)]
New machine model for cortex-a9. Schedule for resources and latency.

Schedule more conservatively to account for stalls on floating point
resources and latency. Use the AGU resource to model latency stalls
since it's shared between FP and LD/ST instructions. This might not be
completely accurate but should work well in practice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198125 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdded debugging options: -misched-only-func/block
Andrew Trick [Sat, 28 Dec 2013 21:57:02 +0000 (21:57 +0000)]
Added debugging options: -misched-only-func/block

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198124 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoThe Cortex-A9 machine model is incomplete. Mark it as such.
Andrew Trick [Sat, 28 Dec 2013 21:57:00 +0000 (21:57 +0000)]
The Cortex-A9 machine model is incomplete. Mark it as such.

Many vector operations never had itineraries. Since the new machine
model was a mapping from existing itinerary classes, we don't have a
model for these. We still want to migrate A9 even though no one has
invested in a complete model, so mark it incomplete to avoid the
scheduler asserting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198123 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd a PostMachineScheduler pass with generic implementation.
Andrew Trick [Sat, 28 Dec 2013 21:56:57 +0000 (21:56 +0000)]
Add a PostMachineScheduler pass with generic implementation.

PostGenericScheduler uses either the new machine model or the hazard
checker for top-down scheduling. Most of the infrastructure for PreRA
machine scheduling is reused.

With a some tuning, this should allow MachineScheduler to be default
for all ARM targets, including cortex-A9, using the new machine
model. Likewise, with additional tuning, it should be able to replace
PostRAScheduler for all targets.

The PostMachineScheduler pass does not currently run the
AntiDepBreaker. There is less need for it on targets that are already
running preRA MachineScheduler. I want to prove it's necessary before
committing to the maintenance burden.

The PostMachineScheduler also currently removes kill flags and adds
them all back later. This is a bit ridiculous. I'd prefer passes to
directly use a liveness utility than rely on flags.

A test case that enables this scheduler will be included in a
subsequent checkin that updates the A9 model.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198122 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMove the PostRA scheduler's fixupKills function for reuse.
Andrew Trick [Sat, 28 Dec 2013 21:56:55 +0000 (21:56 +0000)]
Move the PostRA scheduler's fixupKills function for reuse.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198121 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoStub out a PostMachineScheduler pass.
Andrew Trick [Sat, 28 Dec 2013 21:56:51 +0000 (21:56 +0000)]
Stub out a PostMachineScheduler pass.

Placeholder and boilerplate for a PostRA MachineScheduler pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198120 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFactor MI-Sched in preparation for post-ra scheduling support.
Andrew Trick [Sat, 28 Dec 2013 21:56:47 +0000 (21:56 +0000)]
Factor MI-Sched in preparation for post-ra scheduling support.

Factor the MachineFunctionPass into MachineSchedulerBase.

Split the DAG class into ScheduleDAGMI and SchedulerDAGMILive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198119 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert part of r198115 to see if it fixes a buildbot failure.
Craig Topper [Sat, 28 Dec 2013 18:44:58 +0000 (18:44 +0000)]
Revert part of r198115 to see if it fixes a buildbot failure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198118 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse getSimpleValueType in a few spots where the type should be simple.
Craig Topper [Sat, 28 Dec 2013 18:35:48 +0000 (18:35 +0000)]
Use getSimpleValueType in a few spots where the type should be simple.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198117 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMinor indentation fix to match other switch statements. Change llvm_unreachable text...
Craig Topper [Sat, 28 Dec 2013 17:37:32 +0000 (17:37 +0000)]
Minor indentation fix to match other switch statements. Change llvm_unreachable text to match similar places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198116 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMark some Type and EVT methods as LLVM_READONLY.
Craig Topper [Sat, 28 Dec 2013 16:17:26 +0000 (16:17 +0000)]
Mark some Type and EVT methods as LLVM_READONLY.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198115 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agollvm/test/CodeGen/X86/vselect.ll: Unbreak Windows x64 targets to add -mtriple=x86_64...
NAKAMURA Takumi [Sat, 28 Dec 2013 13:04:29 +0000 (13:04 +0000)]
llvm/test/CodeGen/X86/vselect.ll: Unbreak Windows x64 targets to add -mtriple=x86_64-unknown-unknown.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198114 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[X86] Teach the backend how to fold target specific dag node for packed
Andrea Di Biagio [Sat, 28 Dec 2013 11:11:52 +0000 (11:11 +0000)]
[X86] Teach the backend how to fold target specific dag node for packed
vector shift by immedate count (VSHLI/VSRLI/VSRAI) into a build_vector when
the vector in input to the shift is a build_vector of all constants or UNDEFs.

Target specific nodes for packed shifts by immediate count are in
general introduced by function 'getTargetVShiftByConstNode' (in
X86ISelLowering.cpp) when lowering shift operations, SSE/AVX immediate
shift intrinsics and (only in very few cases) SIGN_EXTEND_INREG dag
nodes.

This patch adds extra rules for simplifying vector shifts inside
function 'getTargetVShiftByConstNode'.

Added file test/CodeGen/X86/vec_shift5.ll to verify that packed
shifts by immediate are correctly folded into a build_vector when the
input vector to the shift dag node is a vector of constants or undefs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198113 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAsmParser: cleanup diagnostics for .rep/.rept
Saleem Abdulrasool [Sat, 28 Dec 2013 06:39:29 +0000 (06:39 +0000)]
AsmParser: cleanup diagnostics for .rep/.rept

Avoid double diagnostics for invalid expressions for count.  Improve caret
location for negative count.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198099 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoIAS: support .rep as an alias for .rept
Saleem Abdulrasool [Sat, 28 Dec 2013 05:54:33 +0000 (05:54 +0000)]
IAS: support .rep as an alias for .rept

The GNU assembler supports .rep as an alias for .rept.  This simply creates the
alias for it and introduces a test for both .rept and .rep.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198097 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARMAsmParser: fix typo in comment
Saleem Abdulrasool [Sat, 28 Dec 2013 03:07:12 +0000 (03:07 +0000)]
ARMAsmParser: fix typo in comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198095 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDisable transforms that introduce calls to exp10*() on Linux due to
Chandler Carruth [Sat, 28 Dec 2013 02:40:19 +0000 (02:40 +0000)]
Disable transforms that introduce calls to exp10*() on Linux due to
widespread glibc bugs.

The glibc implementation of exp10 has a very serious precision bug in
version 2.15 (and older versions). This is still very widely used (the
current Ubuntu LTS for example uses it) and so it isn't reasonable to
make transforms that produce these functions. This fixes many
miscompiles introduced when we started transforming pow(10.0, ...) into
exp10, and it may have fixed other latent miscompiles where exp10
provided sufficient precision but exp10f did not.

This is all really horrible. The primary bug has been fixed for over
a year and glibc 2.18 works correctly for the test cases I have, but it
will be 2017 before the LTS using 2.15 is no longer supported by Ubuntu
(and thus reasonable for folks to be relying on). =[ We're either going
to need to live without these optimizations, or find a way to switch
behavior more dynamically than using simply the fact that the OS is
"Linux".

To make matters worse, there appears to be significant testing and
fixing of numerous other bugs in the exp10 family of functions right now
in glibc. While those haven't been causing problems I've seen in the
wild, it gives me concerns that we may need to wait until an even later
release of glibc before we can reliably transform code into exp10.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198093 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove AsmPrinter::needsRelocationsForDwarfStringPool() since it's
Eric Christopher [Sat, 28 Dec 2013 01:39:17 +0000 (01:39 +0000)]
Remove AsmPrinter::needsRelocationsForDwarfStringPool() since it's
just calling into MAI and is only abstracting for a single interface that
we actually need to check in multiple places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198092 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAttempt to fix JIT unit tests after r198087.
Nico Weber [Fri, 27 Dec 2013 23:36:22 +0000 (23:36 +0000)]
Attempt to fix JIT unit tests after r198087.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198089 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoStrip dead code when linking by default with BFD ld (linux, ...) and ld64 (os x).
Nico Weber [Fri, 27 Dec 2013 22:38:59 +0000 (22:38 +0000)]
Strip dead code when linking by default with BFD ld (linux, ...) and ld64 (os x).

This reduces the size of clang-format from 22 MB to 1.8 MB, diagtool goes from
21 MB to 2.8 MB, libclang.so goes from 29 MB to 20 MB, etc.  The size of the
bin/ folder shrinks from 270 MB to 200 MB.

Targets that support plugins and don't already use EXPORTED_SYMBOL_FILE
(which libclang and libLTO already do) can set NO_DEAD_STRIP to opt out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198087 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTeach DAGCombiner how to fold a SIGN_EXTEND_INREG of a BUILD_VECTOR of
Andrea Di Biagio [Fri, 27 Dec 2013 20:20:28 +0000 (20:20 +0000)]
Teach DAGCombiner how to fold a SIGN_EXTEND_INREG of a BUILD_VECTOR of
ConstantSDNodes (or UNDEFs) into a simple BUILD_VECTOR.

For example, given the following sequence of dag nodes:

  i32 C = Constant<1>
  v4i32 V = BUILD_VECTOR C, C, C, C
  v4i32 Result = SIGN_EXTEND_INREG V, ValueType:v4i1

The SIGN_EXTEND_INREG node can be folded into a build_vector since
the vector in input is a BUILD_VECTOR of constants.

The optimized sequence is:

  i32 C = Constant<-1>
  v4i32 Result = BUILD_VECTOR C, C, C, C

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198084 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDebugInfo: Remove dead code, DICompositeType::addMember(DIDescriptor D)
David Blaikie [Fri, 27 Dec 2013 19:11:52 +0000 (19:11 +0000)]
DebugInfo: Remove dead code, DICompositeType::addMember(DIDescriptor D)

It's no longer necessary to lazily add members to the DICompositeType
member list. Instead any lazy members (special member functions and
member template instantiations) are added to the parent late based on
their context link, the same way that nested types have always been
handled (never being in the member list - just added to the parent DIE
lazily based on context).

Clang's been updated not to use this function anymore as it improves
type unit consistency by never emitting lazy members in type units.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198079 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse two variables here rather than reusing (and abusing) one. This is
Chandler Carruth [Fri, 27 Dec 2013 04:44:35 +0000 (04:44 +0000)]
Use two variables here rather than reusing (and abusing) one. This is
much more clear to me. I meant to make this change before committing the
original patch, but forgot to merge it in. Sorry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198069 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoIntroduce a simple line-by-line iterator type into the Support library.
Chandler Carruth [Fri, 27 Dec 2013 04:28:57 +0000 (04:28 +0000)]
Introduce a simple line-by-line iterator type into the Support library.

This is an iterator which you can build around a MemoryBuffer. It will
iterate through the non-empty, non-comment lines of the buffer as
a forward iterator. It should be small and reasonably fast (although it
could be made much faster if anyone cares, I don't really...).

This will be used to more simply support the text-based sample
profile file format, and is largely based on the original patch by
Diego. I've re-worked the style of it and separated it from the work of
producing a MemoryBuffer from a file which both simplifies the interface
and makes it easier to test.

The style of the API follows the C++ standard naming conventions to fit
in better with iterators in general, much like the Path and FileSystem
interfaces follow standard-based naming conventions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198068 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTLI: Make exp10* avaiable on Linux/Mac/iOS and unavailable elsewhere
Reid Kleckner [Thu, 26 Dec 2013 19:17:04 +0000 (19:17 +0000)]
TLI: Make exp10* avaiable on Linux/Mac/iOS and unavailable elsewhere

This makes it unavailable on NetBSD, Android, etc.

Patch by Brad Smith!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198056 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix a typo.
Roman Divacky [Thu, 26 Dec 2013 14:43:33 +0000 (14:43 +0000)]
Fix a typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198045 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRecognize armv7a and friends as aliases for armv7-a etc. for the purpose
Joerg Sonnenberger [Thu, 26 Dec 2013 11:50:28 +0000 (11:50 +0000)]
Recognize armv7a and friends as aliases for armv7-a etc. for the purpose
of architecture naming.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198043 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM IAS: support .even directive
Saleem Abdulrasool [Thu, 26 Dec 2013 01:52:28 +0000 (01:52 +0000)]
ARM IAS: support .even directive

The .even directive aligns content to an evan-numbered address.  This is an ARM
specific directive applicable to any section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198031 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Sparc] Lower and MachineInstr to MC and print assembly using MCInstPrinter.
Venkatraman Govindaraju [Thu, 26 Dec 2013 01:49:59 +0000 (01:49 +0000)]
[Sparc] Lower and MachineInstr to MC and print assembly using MCInstPrinter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198030 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Sparc] Add target specific MCExpr class to handle sparc specific modifiers like...
Venkatraman Govindaraju [Thu, 26 Dec 2013 00:01:52 +0000 (00:01 +0000)]
[Sparc] Add target specific MCExpr class to handle sparc specific modifiers like %hi, %lo, etc.,

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198029 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Sparc] Add MCInstPrinter implementation for SPARC.
Venkatraman Govindaraju [Wed, 25 Dec 2013 23:43:39 +0000 (23:43 +0000)]
[Sparc] Add MCInstPrinter implementation for SPARC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198028 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ASan] Fix the tests broken by r198018 to check for private linkage of ASan-generated...
Alexander Potapenko [Wed, 25 Dec 2013 17:06:04 +0000 (17:06 +0000)]
[ASan] Fix the tests broken by r198018 to check for private linkage of ASan-generated globals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198020 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Mips] Does not take in account 'use-soft-float' attribute's value when
Simon Atanasyan [Wed, 25 Dec 2013 17:00:27 +0000 (17:00 +0000)]
[Mips] Does not take in account 'use-soft-float' attribute's value when
consider to generate stubs for mips16 hard-float mode.

The patch reviewed by Reed Kotler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198019 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ASan] Fix the test for __asan_gen_ globals and actually fix http://llvm.org/bugs...
Alexander Potapenko [Wed, 25 Dec 2013 16:46:27 +0000 (16:46 +0000)]
[ASan] Fix the test for __asan_gen_ globals and actually fix llvm.org/bugs/show_bug.cgi?id=17976
by setting the correct linkage (as stated in the bug).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198018 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ASan] Make sure none of the __asan_gen_ global strings end up in the symbol table...
Alexander Potapenko [Wed, 25 Dec 2013 14:22:15 +0000 (14:22 +0000)]
[ASan] Make sure none of the __asan_gen_ global strings end up in the symbol table, add a test.

This should fix http://llvm.org/bugs/show_bug.cgi?id=17976
Another test checking for the global variables' locations and prefixes on Darwin will be committed separately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198017 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAVX-512: decoder for AVX-512, made by Alexey Bader.
Elena Demikhovsky [Wed, 25 Dec 2013 11:40:51 +0000 (11:40 +0000)]
AVX-512: decoder for AVX-512, made by Alexey Bader.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198013 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agounittests/Support/ProcessTest.cpp: Don't use "windows.h". Use <windows.h> instead.
NAKAMURA Takumi [Wed, 25 Dec 2013 10:50:11 +0000 (10:50 +0000)]
unittests/Support/ProcessTest.cpp: Don't use "windows.h". Use <windows.h> instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198011 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSupport for microMIPS load effective address.
Zoran Jovanovic [Wed, 25 Dec 2013 10:14:07 +0000 (10:14 +0000)]
Support for microMIPS load effective address.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198010 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSupport for microMIPS FPU instructions 2.
Zoran Jovanovic [Wed, 25 Dec 2013 10:09:27 +0000 (10:09 +0000)]
Support for microMIPS FPU instructions 2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198009 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAVX-512: Result type of scalar SETCC is MVT::i1 for AVX-512.
Elena Demikhovsky [Wed, 25 Dec 2013 10:06:40 +0000 (10:06 +0000)]
AVX-512: Result type of scalar SETCC is MVT::i1 for AVX-512.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198008 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[AArch64]Fix a problem that the register order of fmls/fmla by element is incorrect.
Hao Liu [Wed, 25 Dec 2013 07:12:34 +0000 (07:12 +0000)]
[AArch64]Fix a problem that the register order of fmls/fmla by element is incorrect.
E.g. the codegen result is
     fmls v1.2s, v0.2s, v2.s[3]
which is expected to be
     fmls v0.2s, v1.2s, v2.s[3]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198001 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agogold-plugin.cpp: Use form of <plugin-api.h>, since it is external header.
NAKAMURA Takumi [Wed, 25 Dec 2013 02:24:38 +0000 (02:24 +0000)]
gold-plugin.cpp: Use form of <plugin-api.h>, since it is external header.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197997 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agollvm-config: Fix typo in help message introduced with r197664.
NAKAMURA Takumi [Wed, 25 Dec 2013 02:24:32 +0000 (02:24 +0000)]
llvm-config: Fix typo in help message introduced with r197664.

Thanks, Vinson Lee!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197996 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd missing pattern matches to support ACLE intrinsics of AArch64 NEON.
Jiangning Liu [Wed, 25 Dec 2013 01:22:51 +0000 (01:22 +0000)]
Add missing pattern matches to support ACLE intrinsics of AArch64 NEON.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197993 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix the MSVC 2010 build
Alp Toker [Wed, 25 Dec 2013 01:15:36 +0000 (01:15 +0000)]
Fix the MSVC 2010 build

C++11-style forward declared enums weren't supported until MSVC 2012.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197992 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove link to unexisting llvm-prof docs
Alexey Samsonov [Tue, 24 Dec 2013 19:58:49 +0000 (19:58 +0000)]
Remove link to unexisting llvm-prof docs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197989 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agollvm-symbolizer: add --obj flag to specify a single object file that should be symbol...
Alexey Samsonov [Tue, 24 Dec 2013 19:33:22 +0000 (19:33 +0000)]
llvm-symbolizer: add --obj flag to specify a single object file that should be symbolized.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197988 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix typo.
Richard Sandiford [Tue, 24 Dec 2013 15:22:39 +0000 (15:22 +0000)]
Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197986 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[SystemZ] Use interlocked-access 1 instructions for CodeGen
Richard Sandiford [Tue, 24 Dec 2013 15:18:04 +0000 (15:18 +0000)]
[SystemZ] Use interlocked-access 1 instructions for CodeGen

...namely LOAD AND ADD, LOAD AND AND, LOAD AND OR and LOAD AND EXCLUSIVE OR.
LOAD AND ADD LOGICAL isn't really separately useful for LLVM.

I'll look at adding reusing the CC results in new year.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197985 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[SystemZ] Add MC support for interlocked-access 1 instructions
Richard Sandiford [Tue, 24 Dec 2013 15:14:05 +0000 (15:14 +0000)]
[SystemZ] Add MC support for interlocked-access 1 instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197984 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAVX-512: fixed some patterns for MVT::i1
Elena Demikhovsky [Tue, 24 Dec 2013 14:24:07 +0000 (14:24 +0000)]
AVX-512: fixed some patterns for MVT::i1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197981 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[AArch64]Add patterns to match normal shift nodes: shl, sra and srl.
Hao Liu [Tue, 24 Dec 2013 09:00:21 +0000 (09:00 +0000)]
[AArch64]Add patterns to match normal shift nodes: shl, sra and srl.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197969 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[AArch64 NEON] Fix a bug when lowering BUILD_VECTOR.
Kevin Qin [Tue, 24 Dec 2013 08:16:06 +0000 (08:16 +0000)]
[AArch64 NEON] Fix a bug when lowering BUILD_VECTOR.

DAG.getVectorShuffle() doesn't always return a vector_shuffle node.
If mask is the exact sequence of it's operand(For example, operand_0
is v8i8, and  the mask is 0, 1, 2, 3, 4, 5, 6, 7), it will directly
return that operand. So a check is added here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197967 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[AArch64 NEON] Fix a pattern match failure with NEON_VDUP.
Kevin Qin [Tue, 24 Dec 2013 08:11:47 +0000 (08:11 +0000)]
[AArch64 NEON] Fix a pattern match failure with NEON_VDUP.

This failure caused by improper condition when lowering shuffle_vector
to scalar_to_vector. After this patch NEON_VDUP with v1i64 will not
be generated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197966 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoLangRef documentation for the stackmap and patchpoint intrinsics.
Andrew Trick [Tue, 24 Dec 2013 02:57:25 +0000 (02:57 +0000)]
LangRef documentation for the stackmap and patchpoint intrinsics.

These still have "experimental" status, meaning we don't guarantee
backward compatibility. However, they are already actively used by the
open source WebKit project, and have started to be adopted by other
projects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197930 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[AArch64] Check fmul node single use in fused multiply patterns
Ana Pazos [Tue, 24 Dec 2013 00:47:29 +0000 (00:47 +0000)]
[AArch64] Check fmul node single use in fused multiply patterns

Check for single use of fmul node in fused multiply patterns
to allow generation of fused multiply add/sub instructions.
Otherwise fmul operation ends up being repeated more than
once which does not help peformance on targets with
only one MAC unit, as for example cortex-a53.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197929 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[AArch64 NEON] Fixed fused multiply negate add/sub patterns
Ana Pazos [Tue, 24 Dec 2013 00:40:10 +0000 (00:40 +0000)]
[AArch64 NEON] Fixed fused multiply negate add/sub patterns

The correct pattern matching should be:

- fnmadd is (-Ra) + (-Rn)*Rm  which should be matched as:

  fma (fneg node:$Rn),  node:$Rm, (fneg node:$Ra) and as

  (f32 (fsub (f32 (fneg FPR32:$Ra)), (f32 (fmul FPR32:$Rn, FPR32:$Rm))))

- fnmsub is (-Ra) + Rn*Rm which should be matched as

  fma node:$Rn,  node:$Rm, (fneg node:$Ra) and as

  (f32 (fsub (f32 (fmul FPR32:$Rn, FPR32:$Rm)), FPR32:$Ra))))

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197928 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDebug info: Add enumerators to the __apple_names accelerator table.
Adrian Prantl [Mon, 23 Dec 2013 23:50:20 +0000 (23:50 +0000)]
Debug info: Add enumerators to the __apple_names accelerator table.
rdar://problem/11516681.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197927 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd support to indvars for optimizing sadd.with.overflow.
Andrew Trick [Mon, 23 Dec 2013 23:31:49 +0000 (23:31 +0000)]
Add support to indvars for optimizing sadd.with.overflow.

Split sadd.with.overflow into add + sadd.with.overflow to allow
analysis and optimization. This should ideally be done after
InstCombine, which can perform code motion (eventually indvars should
run after all canonical instcombines). We want ISEL to recombine the
add and the check, at least on x86.

This is currently under an option for reducing live induction
variables: -liv-reduce. The next step is reducing liveness of IVs that
are live out of the overflow check paths. Once the related
optimizations are fully developed, reviewed and tested, I do expect
this to become default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197926 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDebug info: On ARM ensure that the data sections come before the
Adrian Prantl [Mon, 23 Dec 2013 22:24:47 +0000 (22:24 +0000)]
Debug info: On ARM ensure that the data sections come before the
(optional) DWARF sections, so compiling with -g does not result in
different code being generated.

rdar://problem/15623193

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197922 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM: bkpt has an implicit immediate constant 0
Saleem Abdulrasool [Mon, 23 Dec 2013 17:23:58 +0000 (17:23 +0000)]
ARM: bkpt has an implicit immediate constant 0

The bkpt mnemonic has an implicit immediate constant of 0 unless otherwise
specified.  Add an instruction alias for the unvalued breakpoint mnemonic to
treat it as a 0.  This improves compatibility with GNU AS.

Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197913 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix Scalarizer insertion point when replacing PHIs with insertelements
Richard Sandiford [Mon, 23 Dec 2013 14:51:56 +0000 (14:51 +0000)]
Fix Scalarizer insertion point when replacing PHIs with insertelements

If the Scalarizer scalarized a vector PHI but could not scalarize
all uses of it, it would insert a series of insertelements to reconstruct
the vector PHI value from the scalar ones.  The problem was that it would
emit these insertelements immediately after the PHI, even if there were
other PHIs after it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197909 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix Scalarizer handling of vector GEPs with multiple index operands
Richard Sandiford [Mon, 23 Dec 2013 14:45:00 +0000 (14:45 +0000)]
Fix Scalarizer handling of vector GEPs with multiple index operands

The old code only worked for one index operand.  Also handle "inbounds".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197908 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[asan] don't unpoison redzones on function exit in use-after-return mode.
Kostya Serebryany [Mon, 23 Dec 2013 14:15:08 +0000 (14:15 +0000)]
[asan] don't unpoison redzones on function exit in use-after-return mode.

Summary:
Before this change the instrumented code before Ret instructions looked like:
  <Unpoison Frame Redzones>
  if (Frame != OriginalFrame) // I.e. Frame is fake
     <Poison Complete Frame>

Now the instrumented code looks like:
  if (Frame != OriginalFrame) // I.e. Frame is fake
     <Poison Complete Frame>
  else
     <Unpoison Frame Redzones>

Reviewers: eugenis

Reviewed By: eugenis

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2458

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197907 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[asan] produce fewer stores when poisoning stack shadow
Kostya Serebryany [Mon, 23 Dec 2013 09:24:36 +0000 (09:24 +0000)]
[asan] produce fewer stores when poisoning stack shadow

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197904 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[AArch64]The compare to zero intrinsics should be implemented by 'icmp/fcmp' and...
Hao Liu [Mon, 23 Dec 2013 02:42:10 +0000 (02:42 +0000)]
[AArch64]The compare to zero intrinsics should be implemented by 'icmp/fcmp' and 'sext' not 'zext'. Modify the test cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197897 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDefine LLVM_HAS_STRONG_ENUMS
Alp Toker [Sun, 22 Dec 2013 22:19:49 +0000 (22:19 +0000)]
Define LLVM_HAS_STRONG_ENUMS

This is needed to guard an upcoming feature in clang until the C++11 transition
is complete, at which point it can be removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197895 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoThe count() function for STL datatypes returns unsigned, even
Yaron Keren [Sun, 22 Dec 2013 12:04:23 +0000 (12:04 +0000)]
The count() function for STL datatypes returns unsigned, even
where it's only bool-like 1/0 result like std::set.count().

Some of the LLVM ADT already return unsigned count(), while
others return bool count().

This patch modifies SmallPtrSet, SmallSet, SparseSet count()
to return unsigned instead of bool:

 1 instead of true
 0 instead of false

More ADT to follow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197879 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse r2 when encoding tls on ppc32. Fixes PR18305.
Roman Divacky [Sun, 22 Dec 2013 10:45:37 +0000 (10:45 +0000)]
Use r2 when encoding tls on ppc32. Fixes PR18305.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197878 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDwarf: Fix a copy-paste bug.
Benjamin Kramer [Sun, 22 Dec 2013 10:23:23 +0000 (10:23 +0000)]
Dwarf: Fix a copy-paste bug.

This tag isn't emitted by any compiler at the moment. PR18306.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197877 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAVX512: SETCC returns i1 for AVX-512 and i8 for all others
Elena Demikhovsky [Sun, 22 Dec 2013 10:13:18 +0000 (10:13 +0000)]
AVX512: SETCC returns i1 for AVX-512 and i8 for all others

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197876 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd some comments.
Roman Divacky [Sun, 22 Dec 2013 09:48:38 +0000 (09:48 +0000)]
Add some comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197875 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoEnsure bitcode encoding of calling conventions stays stable. Patch by Boaz Ouriel.
Michael Kuperstein [Sun, 22 Dec 2013 07:51:53 +0000 (07:51 +0000)]
Ensure bitcode encoding of calling conventions stays stable. Patch by Boaz Ouriel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197873 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFileCheckize r197869
Alp Toker [Sun, 22 Dec 2013 03:43:58 +0000 (03:43 +0000)]
FileCheckize r197869

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197872 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRelax tab check into a whitespace check to fix the test in r197869
Alp Toker [Sat, 21 Dec 2013 19:11:31 +0000 (19:11 +0000)]
Relax tab check into a whitespace check to fix the test in r197869

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197870 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTableGen: Generate valid identifiers for anonymous records
Alp Toker [Sat, 21 Dec 2013 18:51:00 +0000 (18:51 +0000)]
TableGen: Generate valid identifiers for anonymous records

Backends like OptParserEmitter assume that record names can be used as valid
identifiers.

The period '.' in generated anonymous names broke that assumption, causing a
build-time error and in practice forcing all records to be named.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197869 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix typo in assert message: s/load/store
Mark Lacey [Sat, 21 Dec 2013 00:00:49 +0000 (00:00 +0000)]
Fix typo in assert message: s/load/store

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197846 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoBlockFrequencyInfo: Readded getEntryFreq.
Yuchen Wu [Fri, 20 Dec 2013 22:11:11 +0000 (22:11 +0000)]
BlockFrequencyInfo: Readded getEntryFreq.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197839 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM AnalyzeBranch should ignore DEBUG_VALUES while analyzing terminators.
Lang Hames [Fri, 20 Dec 2013 20:27:51 +0000 (20:27 +0000)]
ARM AnalyzeBranch should ignore DEBUG_VALUES while analyzing terminators.

Found by inspection by Julien Lerouge. Thanks Julian!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197833 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format a couple of mis-formatted functions
Timur Iskhodzhanov [Fri, 20 Dec 2013 20:16:51 +0000 (20:16 +0000)]
clang-format a couple of mis-formatted functions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197831 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd the .secidx test I've forgotten to svn add in 197826
Timur Iskhodzhanov [Fri, 20 Dec 2013 19:06:50 +0000 (19:06 +0000)]
Add the .secidx test I've forgotten to svn add in 197826

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197828 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[COFF] Add support for the .secidx directive
Timur Iskhodzhanov [Fri, 20 Dec 2013 18:15:00 +0000 (18:15 +0000)]
[COFF] Add support for the .secidx directive

Reviewed at http://llvm-reviews.chandlerc.com/D2445

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197826 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoResinstate the command line taking priority over CMakeLists in setting CMAKE_INSTALL_...
Artyom Skrobov [Fri, 20 Dec 2013 18:13:12 +0000 (18:13 +0000)]
Resinstate the command line taking priority over CMakeLists in setting CMAKE_INSTALL_RPATH

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197825 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoImplement initial-exec TLS for PPC32.
Roman Divacky [Fri, 20 Dec 2013 18:08:54 +0000 (18:08 +0000)]
Implement initial-exec TLS for PPC32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197824 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix yet another typo
Timur Iskhodzhanov [Fri, 20 Dec 2013 17:52:31 +0000 (17:52 +0000)]
Fix yet another typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197821 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agollvm-config: Show OBJROOT rather than OBJROOT/BUILD_MODE in MakefileStyle.
NAKAMURA Takumi [Fri, 20 Dec 2013 17:35:52 +0000 (17:35 +0000)]
llvm-config: Show OBJROOT rather than OBJROOT/BUILD_MODE in MakefileStyle.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197818 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agollvm-config: Use build_mode instead of LLVM_BUILDMODE. It should be equivalent in...
NAKAMURA Takumi [Fri, 20 Dec 2013 17:35:46 +0000 (17:35 +0000)]
llvm-config: Use build_mode instead of LLVM_BUILDMODE. It should be equivalent in MakefileStyle.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197817 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSupport for microMIPS FPU instructions 1.
Zoran Jovanovic [Fri, 20 Dec 2013 15:44:08 +0000 (15:44 +0000)]
Support for microMIPS FPU instructions 1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197815 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMake this array const.
Rafael Espindola [Fri, 20 Dec 2013 15:21:32 +0000 (15:21 +0000)]
Make this array const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197814 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[SystemZ] Optimize comparisons with truncated extended loads
Richard Sandiford [Fri, 20 Dec 2013 11:56:02 +0000 (11:56 +0000)]
[SystemZ] Optimize comparisons with truncated extended loads

If the extension of a loaded value is compared against zero and used in
other arithmetic, InstCombine will change the comparison to use the
unextended load.  It's also possible that the comparison could be against
the unextended load from the outset.

In DAG form this becomes a truncation of an extending load.  We want to
strip the truncation if possible so that we can use load-and-test instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197804 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[SystemZ] Extend RISBG optimization
Richard Sandiford [Fri, 20 Dec 2013 11:49:48 +0000 (11:49 +0000)]
[SystemZ] Extend RISBG optimization

The handling of ANY_EXTEND and ZERO_EXTEND was too strict.  In this context
we can treat ZERO_EXTEND in much the same way as an AND and then also handle
outermost ZERO_EXTENDs.

I couldn't find a test that benefited from the ANY_EXTEND change, but it's
more obvious to write it this way once SIGN_EXTEND and ZERO_EXTEND are
handled differently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197802 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix a typo in the docs
Timur Iskhodzhanov [Fri, 20 Dec 2013 10:32:12 +0000 (10:32 +0000)]
Fix a typo in the docs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197798 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd support for krait cpu in llvm::sys::getHostCPUName()
Kai Nacke [Fri, 20 Dec 2013 09:24:13 +0000 (09:24 +0000)]
Add support for krait cpu in llvm::sys::getHostCPUName()

Recently, support for krait cpu was added. This commit extends getHostCPUName()
to return krait as cpu for the APQ8064 (a Krait 300).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197792 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTransforms: Don't create bad weights when eliminating dead cases
Justin Bogner [Fri, 20 Dec 2013 08:21:30 +0000 (08:21 +0000)]
Transforms: Don't create bad weights when eliminating dead cases

If we happen to eliminate every case in a switch that has branch
weights, we currently try to create metadata for the one remaining
branch, triggering an assert. Instead, we need to check that the
metadata we're trying to create is sensible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197791 91177308-0d34-0410-b5e6-96231b3b80d8