oota-llvm.git
9 years agoAdd the testcase from pr23900.
Rafael Espindola [Mon, 22 Jun 2015 01:29:24 +0000 (01:29 +0000)]
Add the testcase from pr23900.

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

9 years ago[X86] Code tidyup - Use SDValue bool operator. NFC.
Simon Pilgrim [Sun, 21 Jun 2015 21:34:32 +0000 (21:34 +0000)]
[X86] Code tidyup - Use SDValue bool operator. NFC.

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

9 years agoAsmPrinter: Don't emit empty .debug_loc entries
Duncan P. N. Exon Smith [Sun, 21 Jun 2015 16:54:56 +0000 (16:54 +0000)]
AsmPrinter: Don't emit empty .debug_loc entries

If we don't know how to represent a .debug_loc entry, skip the entry
entirely rather than emitting an empty one.  Similarly, if a .debug_loc
list has no entries, don't create the list.

We still want to create the variables, just in an optimized-out form
that doesn't have a DW_AT_location.

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

9 years agoAsmPrinter: Rewrite initialization of DbgVariable, NFC
Duncan P. N. Exon Smith [Sun, 21 Jun 2015 16:50:43 +0000 (16:50 +0000)]
AsmPrinter: Rewrite initialization of DbgVariable, NFC

There are three types of `DbgVariable`:
  - alloca variables, created based on the MMI table,
  - register variables, created based on DBG_VALUE instructions, and
  - optimized-out variables.

This commit reconfigures `DbgVariable` to make it easier to tell which
kind we have, and make initialization a little clearer.

For MMI/alloca variables, `FrameIndex.size()` must always equal
`Expr.size()`, and there shouldn't be an `MInsn`.  For register
variables (with a `MInsn`), `FrameIndex` must be empty, and `Expr`
should have 0 or 1 element depending on whether it has a complex
expression (registers with multiple locations use `DebugLocListIndex`).
Optimized-out variables shouldn't have any of these fields.

Moreover, this separates DBG_VALUE initialization until after the
variable is created, simplifying logic in a future commit that changes
`collectVariableInfo()` to stop creating empty .debug_loc entries/lists.

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

9 years ago[X86][SSE] Added missing stack folding test for CVTSD2SS instruction.
Simon Pilgrim [Sun, 21 Jun 2015 16:07:47 +0000 (16:07 +0000)]
[X86][SSE] Added missing stack folding test for CVTSD2SS instruction.

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

9 years agoOptTable.h: Prune a couple of \param(s), since Arg has been ArrayRef-ized. [-Wdocumen...
NAKAMURA Takumi [Sun, 21 Jun 2015 13:44:46 +0000 (13:44 +0000)]
OptTable.h: Prune a couple of \param(s), since Arg has been ArrayRef-ized. [-Wdocumentation]

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

9 years agoDevirtualize ArgList's dtor now that -Wvirtual-dtor and C++11 allow a better way...
David Blaikie [Sun, 21 Jun 2015 06:51:35 +0000 (06:51 +0000)]
Devirtualize ArgList's dtor now that -Wvirtual-dtor and C++11 allow a better way to describe this situation

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

9 years agoArrayRef-ify libDriverMain
David Blaikie [Sun, 21 Jun 2015 06:31:56 +0000 (06:31 +0000)]
ArrayRef-ify libDriverMain

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

9 years agoArrayRef-ify ParseArgs
David Blaikie [Sun, 21 Jun 2015 06:31:53 +0000 (06:31 +0000)]
ArrayRef-ify ParseArgs

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

9 years agoObject: Add load configuration structure for 64 bit PE/COFF.
Rui Ueyama [Sun, 21 Jun 2015 01:12:32 +0000 (01:12 +0000)]
Object: Add load configuration structure for 64 bit PE/COFF.

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

9 years agoSwitch lowering: add heuristic for filling leaf nodes in the weight-balanced binary...
Hans Wennborg [Sat, 20 Jun 2015 17:14:07 +0000 (17:14 +0000)]
Switch lowering: add heuristic for filling leaf nodes in the weight-balanced binary search tree

Sparse switches with profile info are lowered as weight-balanced BSTs. For
example, if the node weights are {1,1,1,1,1,1000}, the right-most node would
end up in a tree by itself, bringing it closer to the top.

However, a leaf in this BST can contain up to 3 cases, and having a single
case in a leaf node as in the example means the tree might become
unnecessarily high.

This patch adds a heauristic to the pivot selection algorithm that moves more
cases into leaf nodes unless that would lower their rank. It still doesn't
yield the optimal tree in every case, but I believe it's conservatibely correct.

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

9 years ago[X86][SSE] Fix PerformSExtCombine bug that accessed the wrong return value of an...
Simon Pilgrim [Sat, 20 Jun 2015 16:19:24 +0000 (16:19 +0000)]
[X86][SSE] Fix PerformSExtCombine bug that accessed the wrong return value of an aggregate type.

Fix to rL237885 to ensure that it accesses the correct return value of an aggregate type.

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

9 years ago[PPC] Factor vector removal into a function and remove O(n^2) behavior.
Benjamin Kramer [Sat, 20 Jun 2015 15:59:41 +0000 (15:59 +0000)]
[PPC] Factor vector removal into a function and remove O(n^2) behavior.

No functionality change intended.

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

9 years ago[SwitchLowering] Remove quadratic vector removal.
Benjamin Kramer [Sat, 20 Jun 2015 15:59:34 +0000 (15:59 +0000)]
[SwitchLowering] Remove quadratic vector removal.

This can be triggered with giant switches. No functionality change
intended.

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

9 years ago[X86][SSE][CostModel] Added full set of sitofp/uitofp costings for SSE2/AVX/AVX2...
Simon Pilgrim [Sat, 20 Jun 2015 14:58:01 +0000 (14:58 +0000)]
[X86][SSE][CostModel] Added full set of sitofp/uitofp costings for SSE2/AVX/AVX2/AVX512F.

Merged separate (but equivalent) SSE2/AVX512F tests.

Removed codegen tests since these are already done better in test/CodeGen/X86.

The actual cost values still need to be updated to match recent codegen improvements.

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

9 years agoUpdate ELFObjectWriter::reset() following r238073.
Yaron Keren [Sat, 20 Jun 2015 11:54:32 +0000 (11:54 +0000)]
Update ELFObjectWriter::reset() following r238073.

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

9 years agoRangify for loops in Inliner::runOnSCC(), NFC.
Yaron Keren [Sat, 20 Jun 2015 07:12:33 +0000 (07:12 +0000)]
Rangify for loops in Inliner::runOnSCC(), NFC.

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

9 years agoIndVarSimplify: Avoid UB from binding a reference to a null pointer
Justin Bogner [Sat, 20 Jun 2015 06:24:05 +0000 (06:24 +0000)]
IndVarSimplify: Avoid UB from binding a reference to a null pointer

Calling operator* on a WeakVH whose Value is null hits undefined
behaviour, since we bind the value to a reference. Instead, go through
`operator Value*` so that we work with the pointer itself.

Found by ubsan.

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

9 years agoReformat.
NAKAMURA Takumi [Sat, 20 Jun 2015 06:22:04 +0000 (06:22 +0000)]
Reformat.

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

9 years agoRevert r240040, "[BranchFolding] Replace custom MachineInstr with MachineInstrExpress...
NAKAMURA Takumi [Sat, 20 Jun 2015 06:21:48 +0000 (06:21 +0000)]
Revert r240040, "[BranchFolding] Replace custom MachineInstr with MachineInstrExpressionTrait"

It caused different emission between stage2 and stage3. Investigating.

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

9 years agoTargetInstrInfo.h: Fix r240192. [-Wdocumentation]
NAKAMURA Takumi [Sat, 20 Jun 2015 03:53:18 +0000 (03:53 +0000)]
TargetInstrInfo.h: Fix r240192. [-Wdocumentation]

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

9 years agoRevert "InstrProf: When reading, copy the data instead of taking a reference. NFC"
Justin Bogner [Sat, 20 Jun 2015 01:37:56 +0000 (01:37 +0000)]
Revert "InstrProf: When reading, copy the data instead of taking a reference. NFC"

Seems like MSVC doesn't like this:

  InstrProf.h(49) : error C2614: 'llvm::InstrProfRecord' : illegal member initialization: 'Hash' is not a base or member

This reverts r240206.

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

9 years agoUse correct escaping for semicolon on Windows.
Peter Collingbourne [Sat, 20 Jun 2015 01:28:20 +0000 (01:28 +0000)]
Use correct escaping for semicolon on Windows.

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

9 years agoInstrProf: When reading, copy the data instead of taking a reference. NFC
Justin Bogner [Sat, 20 Jun 2015 01:26:04 +0000 (01:26 +0000)]
InstrProf: When reading, copy the data instead of taking a reference. NFC

This consolidates the logic to read instrprof records into the on disk
hash table's lookup trait and makes us copy the counter data instead
of taking references to it as we read. This will simplify further
changes to the format.

Patch by Betul Buyukkurt.

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

9 years agoLibDriver tests require x86 target.
Peter Collingbourne [Sat, 20 Jun 2015 01:14:37 +0000 (01:14 +0000)]
LibDriver tests require x86 target.

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

9 years agoLibDriver: implement /libpath and $LIB; ignore /ignore and /machine.
Peter Collingbourne [Sat, 20 Jun 2015 00:57:12 +0000 (00:57 +0000)]
LibDriver: implement /libpath and $LIB; ignore /ignore and /machine.

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

9 years ago[MCJIT] Add a FindGlobalVariableNamed utility
Keno Fischer [Sat, 20 Jun 2015 00:55:58 +0000 (00:55 +0000)]
[MCJIT] Add a FindGlobalVariableNamed utility

Summary: This adds FindGlobalVariableNamed to ExecutionEngine
(plus implementation in MCJIT), which is an analog of
FindFunctionNamed for GlobalVariables.

Reviewers: lhames

Reviewed By: lhames

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D10421

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

9 years agoLowerSwitch: Avoid some undefined behaviour
Justin Bogner [Sat, 20 Jun 2015 00:28:25 +0000 (00:28 +0000)]
LowerSwitch: Avoid some undefined behaviour

When a case of INT64_MIN was followed by a case that was greater than
zero, we were overflowing a signed integer here. Since we've sorted
the cases here anyway (and thus currentValue must be greater than
nextValue) it's simple enough to avoid this by using addition rather
than subtraction.

Found by UBSAN on existing tests.

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

9 years ago[Statepoint] Remove unnecessary argument from Statepoint::getRelocates
Sanjoy Das [Sat, 20 Jun 2015 00:01:03 +0000 (00:01 +0000)]
[Statepoint] Remove unnecessary argument from Statepoint::getRelocates

NFC.

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

9 years ago[Statepoint][NFC] Fix include guard style.
Sanjoy Das [Sat, 20 Jun 2015 00:00:58 +0000 (00:00 +0000)]
[Statepoint][NFC] Fix include guard style.

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

9 years agoRevert 240130, it caused crashes (repro in PR23900).
Nico Weber [Fri, 19 Jun 2015 23:43:47 +0000 (23:43 +0000)]
Revert 240130, it caused crashes (repro in PR23900).

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

9 years agoname change: hasPattern() -> getMachineCombinerPatterns() ; NFC
Sanjay Patel [Fri, 19 Jun 2015 23:21:42 +0000 (23:21 +0000)]
name change: hasPattern() -> getMachineCombinerPatterns() ; NFC

This was suggested as part of D10460, but it's independent of
any functional change.

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

9 years ago[CallGraph] Given -print-callgraph a stable printing order.
Sanjoy Das [Fri, 19 Jun 2015 23:20:31 +0000 (23:20 +0000)]
[CallGraph] Given -print-callgraph a stable printing order.

Summary:
Since FunctionMap has llvm::Function pointers as keys, the order in
which the traversal happens can differ from run to run, causing spurious
FileCheck failures.  Have CallGraph::print sort the CallGraphNodes by
name before printing them.

Reviewers: bogner, chandlerc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D10575

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

9 years agoTry to fix generation of LLVMExports.cmake under Visual Studio.
Dan Liew [Fri, 19 Jun 2015 21:50:27 +0000 (21:50 +0000)]
Try to fix generation of LLVMExports.cmake under Visual Studio.
If LLVMDebugInfoPDB links against the DIA SDK then the exports file
would contain an INTERFACE_LINK_LIBRARIES property that contained an
absolute path to ``diaguids.lib`` which used a native windows path (interpreted
as escape sequences when LLVMExports.cmake is imported causing
``find_package(LLVM)`` to fail) rather than the correct CMake style path.

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

9 years agoImprove error handling of getRelocationAddend.
Rafael Espindola [Fri, 19 Jun 2015 20:58:43 +0000 (20:58 +0000)]
Improve error handling of getRelocationAddend.

This patch changes getRelocationAddend to use ErrorOr and considers it an error
to try to get the addend of a REL section.

If, for example, a x86_64 file has a REL section, that file is corrupted and
we should reject it.

Using ErrorOr is not ideal since we check the section type once per relocation
instead of once per section.

Checking once per section would involve getRelocationAddend just asserting and
callers checking the section before iterating over the relocations.

In any case, this is an improvement and includes a test.

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

9 years agoFix header path in CMake. NFC.
Pete Cooper [Fri, 19 Jun 2015 20:49:02 +0000 (20:49 +0000)]
Fix header path in CMake.  NFC.

The ADDITIONAL_HEADER_DIRS command can be used to tell UIs that a given library
owns certain headers.  The path for MCParser was missing MC/ in it.

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

9 years agoMIR Parser: report an error when a basic block isn't found.
Alex Lorenz [Fri, 19 Jun 2015 20:12:03 +0000 (20:12 +0000)]
MIR Parser: report an error when a basic block isn't found.

This commit reports an error when the MIR parser can't find
a basic block with the machine basic block's name.

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

9 years ago[LoopDist] Rename RuntimeCheckEmitter to LoopVersioning, NFC
Adam Nemet [Fri, 19 Jun 2015 19:32:48 +0000 (19:32 +0000)]
[LoopDist] Rename RuntimeCheckEmitter to LoopVersioning, NFC

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

9 years ago[LoopDist] Move pointer-to-partition computation out of RuntimeCheckEmitter, NFC
Adam Nemet [Fri, 19 Jun 2015 19:32:41 +0000 (19:32 +0000)]
[LoopDist] Move pointer-to-partition computation out of RuntimeCheckEmitter, NFC

This starts preparing the class to become a (more) general
LoopVersioning utility class.

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

9 years agoDelete dead code. NFC.
Rafael Espindola [Fri, 19 Jun 2015 19:07:59 +0000 (19:07 +0000)]
Delete dead code. NFC.

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

9 years agoAMDGPU: Fix filename in comment
Matt Arsenault [Fri, 19 Jun 2015 17:56:51 +0000 (17:56 +0000)]
AMDGPU: Fix filename in comment

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

9 years agoMake getRelocationSection MachO only.
Rafael Espindola [Fri, 19 Jun 2015 17:54:28 +0000 (17:54 +0000)]
Make getRelocationSection MachO only.

There are 3 types of relocations on MachO
* Scattered
* Section based
* Symbol based

On ELF and COFF relocations are symbol based.

We were in the strange situation that we abstracted over two of them. This makes
section based relocations MachO only.

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

9 years agoMIR Serialization: Serialize the list of machine basic blocks with simple attributes.
Alex Lorenz [Fri, 19 Jun 2015 17:43:07 +0000 (17:43 +0000)]
MIR Serialization: Serialize the list of machine basic blocks with simple attributes.

This commit implements the initial serialization of machine basic blocks in a
machine function. Only the simple, scalar MBB attributes are serialized. The
reference to LLVM IR's basic block is preserved when that basic block has a name.

Reviewers: Duncan P. N. Exon Smith

Differential Revision: http://reviews.llvm.org/D10465

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

9 years ago[SLP] Vectorize for all-constant entries.
Michael Zolotukhin [Fri, 19 Jun 2015 17:40:15 +0000 (17:40 +0000)]
[SLP] Vectorize for all-constant entries.

Differential Revision: http://reviews.llvm.org/D10531

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

9 years agoAMDGPU: Fix some places missed in rename
Matt Arsenault [Fri, 19 Jun 2015 17:39:03 +0000 (17:39 +0000)]
AMDGPU: Fix some places missed in rename

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

9 years agoMIR Serialization: use default member initializers to initialize yaml::MachineFunctio...
Alex Lorenz [Fri, 19 Jun 2015 17:36:02 +0000 (17:36 +0000)]
MIR Serialization: use default member initializers to initialize yaml::MachineFunction. NFC.

Default member initializers are permitted since r236244.

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

9 years agoTypo. NFC.
Chad Rosier [Fri, 19 Jun 2015 17:32:57 +0000 (17:32 +0000)]
Typo. NFC.

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

9 years agoAvoid warning about inability to cast from ptr-to-obj to ptr-to-fun.
Douglas Katzman [Fri, 19 Jun 2015 17:21:02 +0000 (17:21 +0000)]
Avoid warning about inability to cast from ptr-to-obj to ptr-to-fun.

Use POSIX.1-2003 Technical Corrigendum 1 suggested workaround.

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

9 years agoFixed/added namespace ending comments using clang-tidy. NFC
Alexander Kornienko [Fri, 19 Jun 2015 15:57:42 +0000 (15:57 +0000)]
Fixed/added namespace ending comments using clang-tidy. NFC

The patch is generated using this command:

tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \
  -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \
  llvm/lib/

Thanks to Eugene Kosov for the original patch!

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

9 years agoFix the build.
Rafael Espindola [Fri, 19 Jun 2015 14:34:12 +0000 (14:34 +0000)]
Fix the build.

Sorry, I have no idea how grep failed to find this.

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

9 years agoReplace EM_486 with EM_IAMCU.
Rafael Espindola [Fri, 19 Jun 2015 14:22:16 +0000 (14:22 +0000)]
Replace EM_486 with EM_IAMCU.

This matches the current
http://www.sco.com/developers/gabi/latest/ch4.eheader.html#machine

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

9 years ago[ASan] Initial support for Kernel AddressSanitizer
Alexander Potapenko [Fri, 19 Jun 2015 12:19:07 +0000 (12:19 +0000)]
[ASan] Initial support for Kernel AddressSanitizer

This patch adds initial support for the -fsanitize=kernel-address flag to Clang.
Right now it's quite restricted: only out-of-line instrumentation is supported, globals are not instrumented, some GCC kasan flags are not supported.
Using this patch I am able to build and boot the KASan tree with LLVMLinux patches from github.com/ramosian-glider/kasan/tree/kasan_llvmlinux.
To disable KASan instrumentation for a certain function attribute((no_sanitize("kernel-address"))) can be used.

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

9 years agoMake all temporary symbols unnamed.
Rafael Espindola [Fri, 19 Jun 2015 12:16:55 +0000 (12:16 +0000)]
Make all temporary symbols unnamed.

What this does is make all symbols that would otherwise start with a .L
(or L on MachO) unnamed.

Some of these symbols still show up in the symbol table, but we can just
make them unnamed.

In order to make sure we produce identical results when going thought assembly,
all .L (not just the compiler produced ones), are now unnamed.

Running llc on llvm-as.opt.bc, the peak memory usage goes from 208.24MB to
205.57MB.

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

9 years agoIRBuilder: Add unit tests for construction of globals with address space
Tobias Grosser [Fri, 19 Jun 2015 07:19:17 +0000 (07:19 +0000)]
IRBuilder: Add unit tests for construction of globals with address space

This was forgotten in r240113. Thanks Eric for paying attention.

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

9 years agoCMake: Stop using LLVM's custom parse_arguments (delete implementation). NFC
Filipe Cabecinhas [Fri, 19 Jun 2015 03:45:42 +0000 (03:45 +0000)]
CMake: Stop using LLVM's custom parse_arguments (delete implementation). NFC

Summary:
Finally, delete LLVM's parse_arguments() definition.
Second part of D10531.

This is dependent on http://reviews.llvm.org/D10529

Reviewers: pcc, beanz, chapuni

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D10531

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

9 years agoCMake: Stop using LLVM's custom parse_arguments. NFC
Filipe Cabecinhas [Fri, 19 Jun 2015 03:45:40 +0000 (03:45 +0000)]
CMake: Stop using LLVM's custom parse_arguments. NFC

Summary:
Use CMake's cmake_parse_arguments() instead.
It's called in a slightly different way, but supports all our use cases.
It's in CMake 2.8.8, which is our minimum supported version.

CMake 3.0 doc (roughly the same. No direct link to 2.8.8 doc):
http://www.cmake.org/cmake/help/v3.0/module/CMakeParseArguments.html?highlight=cmake_parse_arguments

Reviewers: pcc, beanz, chapuni

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D10531

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

9 years ago[ARM] Look through concat when lowering in-place shuffles (VZIP, ..)
Ahmed Bougacha [Fri, 19 Jun 2015 02:32:35 +0000 (02:32 +0000)]
[ARM] Look through concat when lowering in-place shuffles (VZIP, ..)

Currently, we canonicalize shuffles that produce a result larger than
their operands with:
  shuffle(concat(v1, undef), concat(v2, undef))
->
  shuffle(concat(v1, v2), undef)

because we can access quad vectors (see PerformVECTOR_SHUFFLECombine).

This is useful in the general case, but there are special cases where
native shuffles produce larger results: the two-result ops.

We can look through the concat when lowering them:
  shuffle(concat(v1, v2), undef)
->
  concat(VZIP(v1, v2):0, :1)

This lets us generate the native shuffles instead of scalarizing to
dozens of VMOVs.

Differential Revision: http://reviews.llvm.org/D10424

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

9 years ago[ARM] Factor out two-result shuffle matching. NFCI.
Ahmed Bougacha [Fri, 19 Jun 2015 02:25:01 +0000 (02:25 +0000)]
[ARM] Factor out two-result shuffle matching.  NFCI.

In preparation for a future patch: makes it easier to do the same
matching to generate different nodes, without duplication.

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

9 years ago[ARM] Add D-sized vtrn/vuzp/vzip tests, and cleanup. NFC.
Ahmed Bougacha [Fri, 19 Jun 2015 02:15:34 +0000 (02:15 +0000)]
[ARM] Add D-sized vtrn/vuzp/vzip tests, and cleanup.  NFC.

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

9 years agoIRBuilder: Allow globals to be constructed in a specific address space
Tobias Grosser [Fri, 19 Jun 2015 02:12:07 +0000 (02:12 +0000)]
IRBuilder: Allow globals to be constructed in a specific address space

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

9 years agoFix "the the" in comments.
Eric Christopher [Fri, 19 Jun 2015 01:53:21 +0000 (01:53 +0000)]
Fix "the the" in comments.

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

9 years agoMIR Serialization: Reenable one of the MIRParser tests by reverting r239805.
Alex Lorenz [Thu, 18 Jun 2015 22:46:27 +0000 (22:46 +0000)]
MIR Serialization: Reenable one of the MIRParser tests by reverting r239805.

The test 'llvm/test/CodeGen/MIR/machine-function.mir' was disabled on
x86 msc18 in r239805 as it failed. My commit r240054 have fixed the
problem, so this commit reverts the commit that disabled the test as
it should pass now.

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

9 years agoImprove the --expand-relocs handling of MachO.
Rafael Espindola [Thu, 18 Jun 2015 22:38:20 +0000 (22:38 +0000)]
Improve the --expand-relocs handling of MachO.

In a relocation target can take 3 basic forms

* A r_value in scattered relocations.
* A symbol in external relocations.
* A section is non-external relocations.

Have the dump reflect that. With this change we go from

CHECK-NEXT:       Extern: 0
CHECK-NEXT:       Type: X86_64_RELOC_SUBTRACTOR (5)
CHECK-NEXT:       Symbol: 0x2
CHECK-NEXT:       Scattered: 0

To just

// CHECK-NEXT:       Type: X86_64_RELOC_SUBTRACTOR (5)
// CHECK-NEXT:       Section: __data (2)

Since the relocation is with a section, we print the seciton name and don't
need to say that it is not scattered or external.

Someone motivated can add further special cases for things like
ARM64_RELOC_ADDEND and ARM_RELOC_PAIR.

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

9 years agoAvoid redundant select node in early if-conversion pass
Yi Jiang [Thu, 18 Jun 2015 22:34:09 +0000 (22:34 +0000)]
Avoid redundant select node in early if-conversion pass

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

9 years agoSwitch lowering: enable whole-switch jump tables at -O0.
Hans Wennborg [Thu, 18 Jun 2015 22:22:30 +0000 (22:22 +0000)]
Switch lowering: enable whole-switch jump tables at -O0.

To same compile time, the analysis to find dense case-clusters in switches is
not done at -O0. However, when the whole switch is dense enough, it is easy to
turn it into a jump table, resulting in much faster code with no extra effort.

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

9 years agoPass --expand-relocs to a few more tests.
Rafael Espindola [Thu, 18 Jun 2015 22:12:47 +0000 (22:12 +0000)]
Pass --expand-relocs to a few more tests.

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

9 years agouse SDValue bool operator; NFCI
Sanjay Patel [Thu, 18 Jun 2015 21:44:31 +0000 (21:44 +0000)]
use SDValue bool operator; NFCI

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

9 years agoadd test to show suboptimal load merging behavior
Sanjay Patel [Thu, 18 Jun 2015 21:34:26 +0000 (21:34 +0000)]
add test to show suboptimal load merging behavior

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

9 years ago[X86][SSE][CostModel] Fixed uitofp/sitofp cost target tests to specify sse2/avx2...
Simon Pilgrim [Thu, 18 Jun 2015 21:26:01 +0000 (21:26 +0000)]
[X86][SSE][CostModel] Fixed uitofp/sitofp cost target tests to specify sse2/avx2/avx512f directly instead of via a cpu model.

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

9 years agofixed to test attributes and use better checks
Sanjay Patel [Thu, 18 Jun 2015 21:12:24 +0000 (21:12 +0000)]
fixed to test attributes and use better checks

1. Used update_llc_test_checks.py to tighten checks
2. Fixed triple (nothing Darwin-specific here)
3. Replaced CPU specifiers with attributes
4. Fixed comments
5. Removed IvyBridge run because it did not add any coverage

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

9 years ago[Hexagon] Fixing unused field copypasta.
Colin LeMahieu [Thu, 18 Jun 2015 21:03:13 +0000 (21:03 +0000)]
[Hexagon] Fixing unused field copypasta.

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

9 years agoMIR Serialization: initialize the fields without the default initializers in yaml...
Alex Lorenz [Thu, 18 Jun 2015 20:57:41 +0000 (20:57 +0000)]
MIR Serialization: initialize the fields without the default initializers in yaml::MachineFunction

My commit r239790 which introduced serialization for simple machine function attributes didn't
initialize them when parsing because I have misread the documentation for YAML IO's mapOptional
method. The mapOptional method doesn't actually set the values to the values returned by the
default constructor for that type when the key value pair is missing, it just doesn't modify
those values, so they still contain the value that was set during initialization by the default
constructor. But the fields in yaml::MachineFunction with types like unsigned and bool are not
initialized by default, and thus they can still be uninitialized after mapOptional during parsing.
This commit adds default initialization for those fields to prevent this.

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

9 years agoUse --expand-relocs in a test. It will make the next change easier to read.
Rafael Espindola [Thu, 18 Jun 2015 20:57:35 +0000 (20:57 +0000)]
Use --expand-relocs in a test. It will make the next change easier to read.

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

9 years ago[Hexagon] Printing packet brackets when asm printing and adding a number of tests...
Colin LeMahieu [Thu, 18 Jun 2015 20:43:50 +0000 (20:43 +0000)]
[Hexagon] Printing packet brackets when asm printing and adding a number of tests that test packet brackets.

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

9 years ago[MC] Adding prettyPrintAsm to MCTargetStreamer to allow targets to specialize how...
Colin LeMahieu [Thu, 18 Jun 2015 20:43:22 +0000 (20:43 +0000)]
[MC] Adding prettyPrintAsm to MCTargetStreamer to allow targets to specialize how instructions are printed to asm.

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

9 years ago[X86] Rename RegInfo to TRI as suggested by Eric
Reid Kleckner [Thu, 18 Jun 2015 20:32:02 +0000 (20:32 +0000)]
[X86] Rename RegInfo to TRI as suggested by Eric

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

9 years ago[X86] Refactor stack adjustments into X86FrameLowering::BuildStackAdjustment
Reid Kleckner [Thu, 18 Jun 2015 20:22:12 +0000 (20:22 +0000)]
[X86] Refactor stack adjustments into X86FrameLowering::BuildStackAdjustment

Deduplicates some code and lets us use LEA on atom when adjusting the
stack around callee-cleanup calls. This is the only intended
functionality change.

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

9 years ago[BranchFolding] Replace custom MachineInstr with MachineInstrExpressionTrait
Benjamin Kramer [Thu, 18 Jun 2015 20:00:03 +0000 (20:00 +0000)]
[BranchFolding] Replace custom MachineInstr with MachineInstrExpressionTrait

While the hash functions are subtly different it shouldn't have an
impact. Instructions are checked with isIdenticalTo later.

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

9 years ago[CallGraph] Teach the CallGraph about non-leaf intrinsics.
Sanjoy Das [Thu, 18 Jun 2015 19:28:26 +0000 (19:28 +0000)]
[CallGraph] Teach the CallGraph about non-leaf intrinsics.

Summary:
Currently intrinsics don't affect the creation of the call graph.
This is not accurate with respect to statepoint and patchpoint
intrinsics -- these do call (or invoke) LLVM level functions.

This change fixes this inconsistency by adding a call to the external
node for call sites that call these non-leaf intrinsics.  This coupled
with the fact that these intrinsics also escape the function pointer
they call gives us a conservatively correct call graph.

Reviewers: reames, chandlerc, atrick, pgavlin

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D10526

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

9 years ago[CodeGen] Don't emit a random reference to the personality function
David Majnemer [Thu, 18 Jun 2015 18:31:46 +0000 (18:31 +0000)]
[CodeGen] Don't emit a random reference to the personality function

This should fix issues we've been seeing with Darwin.

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

9 years agodon't repeat function / variable names in comments; NFC
Sanjay Patel [Thu, 18 Jun 2015 18:28:20 +0000 (18:28 +0000)]
don't repeat function / variable names in comments; NFC

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

9 years ago[X86] Remove unneeded parameters and deduplicate stack alignment code
Reid Kleckner [Thu, 18 Jun 2015 18:03:25 +0000 (18:03 +0000)]
[X86] Remove unneeded parameters and deduplicate stack alignment code

NFC

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

9 years ago[EliminateDuplicatePHINodes] Replace custom hash map with DenseSet.
Benjamin Kramer [Thu, 18 Jun 2015 16:01:00 +0000 (16:01 +0000)]
[EliminateDuplicatePHINodes] Replace custom hash map with DenseSet.

While there use hash_combine instead of hand-rolled hashing. No
functionality change intended.

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

9 years agofix typo; NFC
Sanjay Patel [Thu, 18 Jun 2015 15:53:33 +0000 (15:53 +0000)]
fix typo; NFC

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

9 years ago[SPARC] Repair GOT references to internal symbols.
James Y Knight [Thu, 18 Jun 2015 15:05:15 +0000 (15:05 +0000)]
[SPARC] Repair GOT references to internal symbols.

They had been getting emitted as a section + offset reference, which
is bogus since the value needs to be the offset within the GOT, not
the actual address of the symbol's object.

Differential Revision: http://reviews.llvm.org/D10441

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

9 years agoConvert a few tests to use llvm-mc.
Rafael Espindola [Thu, 18 Jun 2015 13:39:07 +0000 (13:39 +0000)]
Convert a few tests to use llvm-mc.

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

9 years agoquick fix for failure from r.240012
Asaf Badouh [Thu, 18 Jun 2015 12:57:24 +0000 (12:57 +0000)]
quick fix for failure from r.240012

failure:
http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/11847/steps/build_Lld/logs/stdio

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

9 years ago[X86][AVX2] Added AVX2 SINT_TO_FP/UINT_TO_FP tests
Simon Pilgrim [Thu, 18 Jun 2015 12:32:28 +0000 (12:32 +0000)]
[X86][AVX2] Added AVX2 SINT_TO_FP/UINT_TO_FP tests

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

9 years ago[AVX512]
Asaf Badouh [Thu, 18 Jun 2015 12:30:53 +0000 (12:30 +0000)]
[AVX512]
add instructions: VPAVGB and VPAVGW

review
http://reviews.llvm.org/D10504

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

9 years agoUpdate LLVM bindings after r239940. Apparently these aren't included in
Daniel Jasper [Thu, 18 Jun 2015 11:51:16 +0000 (11:51 +0000)]
Update LLVM bindings after r239940. Apparently these aren't included in
any tests and I even don't know how to run the tests. This seems like a
minimal change to make them work again, although I can't really verify
at this point. Additionally, it probably makes sense to propagate the
personality parameter removal further.

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

9 years agoAVX-512: (fixed) Added encoding of all forms of VPERMT2W/D/Q/PS/PD and VPERMI2W/D...
Elena Demikhovsky [Thu, 18 Jun 2015 08:56:19 +0000 (08:56 +0000)]
AVX-512: (fixed) Added encoding of all forms of VPERMT2W/D/Q/PS/PD and VPERMI2W/D/Q/PS/PD.
Intrinsics and tests for them are comming in the next patch.

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

9 years agoreverted 239999 due to test failures
Elena Demikhovsky [Thu, 18 Jun 2015 08:06:49 +0000 (08:06 +0000)]
reverted 239999 due to test failures

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

9 years agoAVX-512: Added encoding of all forms of VPERMT2W/D/Q/PS/PD
Elena Demikhovsky [Thu, 18 Jun 2015 07:29:40 +0000 (07:29 +0000)]
AVX-512: Added encoding of all forms of VPERMT2W/D/Q/PS/PD
and VPERMI2W/D/Q/PS/PD.
Intrinsics and tests for them are comming in the next patch.

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

9 years agoLTO: Introduce LTOModule::getSymbolGV().
Peter Collingbourne [Thu, 18 Jun 2015 05:10:06 +0000 (05:10 +0000)]
LTO: Introduce LTOModule::getSymbolGV().

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

9 years ago[autoconf] Detect OLE32 for mingw.
NAKAMURA Takumi [Thu, 18 Jun 2015 04:16:05 +0000 (04:16 +0000)]
[autoconf] Detect OLE32 for mingw.

It has been done in CMake build.

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

9 years agoconfig.h.*: Rework r210144. Don't edit config.h.in manually.
NAKAMURA Takumi [Thu, 18 Jun 2015 04:08:20 +0000 (04:08 +0000)]
config.h.*: Rework r210144. Don't edit config.h.in manually.

  - Generate #include in configure.ac.
  - Resurrect the copy of llvm-config.h.cmake into config.h.cmake.

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

9 years agoReorder LLVM_ENABLE_ABI_BREAKING_CHECKS in llvm-config.h.*.
NAKAMURA Takumi [Thu, 18 Jun 2015 04:07:12 +0000 (04:07 +0000)]
Reorder LLVM_ENABLE_ABI_BREAKING_CHECKS in llvm-config.h.*.

FIXME: Could we unify the description of LLVM_ENABLE_ABI_BREAKING_CHECKS between *.in and *.cmake?

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

9 years ago[NFC] more comments in SLSR
Jingyue Wu [Thu, 18 Jun 2015 03:35:57 +0000 (03:35 +0000)]
[NFC] more comments in SLSR

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

9 years agoSilence resource compiler using /nologo flag.
Peter Collingbourne [Thu, 18 Jun 2015 01:15:18 +0000 (01:15 +0000)]
Silence resource compiler using /nologo flag.

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

9 years ago[AsmPrinter] Make isRepeatedByteSequence smarter about odd integer types
Benjamin Kramer [Wed, 17 Jun 2015 23:55:17 +0000 (23:55 +0000)]
[AsmPrinter] Make isRepeatedByteSequence smarter about odd integer types

- zext the value to alloc size first, then check if the value repeats
  with zero padding included. If so we can still emit a .space
- Do the checking with APInt.isSplat(8), which handles non-pow2 types
- Also handle large constants (bit width > 64)
- In a ConstantArray all elements have the same type, so it's sufficient
  to check the first constant recursively and then just compare if all
  following constants are the same by pointer compare

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