oota-llvm.git
9 years ago[SPARC] Don't compare arch name as a string, use the enum instead.
Douglas Katzman [Thu, 6 Aug 2015 15:44:12 +0000 (15:44 +0000)]
[SPARC] Don't compare arch name as a string, use the enum instead.

Fixes PR22695

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

9 years agoReuse variable. NFC.
Rafael Espindola [Thu, 6 Aug 2015 14:51:02 +0000 (14:51 +0000)]
Reuse variable. NFC.

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

9 years agoSilencing a -Wtype-limits warning; NFC.
Aaron Ballman [Thu, 6 Aug 2015 14:07:29 +0000 (14:07 +0000)]
Silencing a -Wtype-limits warning; NFC.

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

9 years agoPlug memory leaks in AsmWriterEmitter::EmitPrintAliasInstruction.
Yaron Keren [Thu, 6 Aug 2015 13:18:59 +0000 (13:18 +0000)]
Plug memory leaks in AsmWriterEmitter::EmitPrintAliasInstruction.

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

9 years agoFix minor typos. NFC.
Chad Rosier [Thu, 6 Aug 2015 12:49:40 +0000 (12:49 +0000)]
Fix minor typos. NFC.

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

9 years agoRevert "Divide the primitive size in bits by eight so the initial load's alignment...
Renato Golin [Thu, 6 Aug 2015 10:37:59 +0000 (10:37 +0000)]
Revert "Divide the primitive size in bits by eight so the initial load's alignment is in bytes as expected. Tested with the included unit test."

This reverts commit r244155, as it was breaking the buildbots for too long.
Should be reapplied with proper fix.

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

9 years agollvm/lib/IR/AttributeImpl.h: Move comment block not to cover typedef, introduced...
NAKAMURA Takumi [Thu, 6 Aug 2015 09:49:17 +0000 (09:49 +0000)]
llvm/lib/IR/AttributeImpl.h: Move comment block not to cover typedef, introduced in r244164. [-Wdocumentation]

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

9 years agoRemoving tailing whitespaces
Michael Liao [Thu, 6 Aug 2015 09:06:20 +0000 (09:06 +0000)]
Removing tailing whitespaces

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

9 years ago[X86] Improve EmitLoweredSelect for contiguous CMOV pseudo instructions.
Michael Kuperstein [Thu, 6 Aug 2015 08:45:34 +0000 (08:45 +0000)]
[X86] Improve EmitLoweredSelect for contiguous CMOV pseudo instructions.

This change improves EmitLoweredSelect() so that multiple contiguous CMOV pseudo
instructions with the same (or exactly opposite) conditions get lowered using a single
new basic-block. This eliminates unnecessary extra basic-blocks (and CFG merge points)
when contiguous CMOVs are being lowered.

Patch by: kevin.b.smith@intel.com
Differential Revision: http://reviews.llvm.org/D11428

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

9 years ago[PM/AA] Clean up and homogenize comments throughout basic-aa.
Chandler Carruth [Thu, 6 Aug 2015 08:17:06 +0000 (08:17 +0000)]
[PM/AA] Clean up and homogenize comments throughout basic-aa.

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

9 years agoFix Visual C++ error C2248:
Yaron Keren [Thu, 6 Aug 2015 07:59:26 +0000 (07:59 +0000)]
Fix Visual C++ error C2248:
'llvm::TrailingObjects<`anonymous-namespace'::Class1,short,llvm::NoTrailingTypeArg>::additionalSizeToAlloc' :
cannot access protected member declared in class
 'llvm::TrailingObjects<`anonymous-namespace'::Class1,short,llvm::NoTrailingTypeArg>'

 I'm not sure how this compiles with gcc.
 Aren't protecteded members accessible only with protected or public inheritance?

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

9 years ago[PM/AA] Run clang-format over all of basic-aa before making more
Chandler Carruth [Thu, 6 Aug 2015 07:57:58 +0000 (07:57 +0000)]
[PM/AA] Run clang-format over all of basic-aa before making more
substantive edits.

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

9 years ago[PM/AA] Hoist the interface for BasicAA into a header file.
Chandler Carruth [Thu, 6 Aug 2015 07:33:15 +0000 (07:33 +0000)]
[PM/AA] Hoist the interface for BasicAA into a header file.

This is the first mechanical step in preparation for making this and all
the other alias analysis passes available to the new pass manager. I'm
factoring out all the totally boring changes I can so I'm moving code
around here with no other changes. I've even minimized the formatting
churn.

I'll reformat and freshen comments on the interface now that its located
in the right place so that the substantive changes don't triger this.

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

9 years agoCOFF: Assign the correct symbol type to internal functions.
Peter Collingbourne [Thu, 6 Aug 2015 05:26:35 +0000 (05:26 +0000)]
COFF: Assign the correct symbol type to internal functions.

The COFFSymbolRef::isFunctionDefinition() function tests for several conditions
that are not related to whether a symbol is a function, but rather whether
the symbol meets the requirements for a function definition auxiliary record,
which excludes certain symbols such as internal functions and undefined
references. The test we need to determine the symbol type is much simpler:
we only need to compare the complex type against IMAGE_SYM_DTYPE_FUNCTION.

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

9 years ago[PM/AA] Simplify the AliasAnalysis interface by removing a wrapper
Chandler Carruth [Thu, 6 Aug 2015 02:05:46 +0000 (02:05 +0000)]
[PM/AA] Simplify the AliasAnalysis interface by removing a wrapper
around a DataLayout interface in favor of directly querying DataLayout.

This wrapper specifically helped handle the case where this no
DataLayout, but LLVM now requires it simplifynig all of this. I've
updated callers to directly query DataLayout. This in turn exposed
a bunch of places where we should have DataLayout readily available but
don't which I've fixed. This then in turn exposed that we were passing
DataLayout around in a bunch of arguments rather than making it readily
available so I've also fixed that.

No functionality changed.

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

9 years ago[libFuzzer] add one more mutation strategy: byte shuffling
Kostya Serebryany [Thu, 6 Aug 2015 01:29:13 +0000 (01:29 +0000)]
[libFuzzer] add one more mutation strategy: byte shuffling

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

9 years agoMIR Serialization: Initial serialization of the machine operand target flags.
Alex Lorenz [Thu, 6 Aug 2015 00:44:07 +0000 (00:44 +0000)]
MIR Serialization: Initial serialization of the machine operand target flags.

This commit implements the initial serialization of the machine operand target
flags. It extends the 'TargetInstrInfo' class to add two new methods that help
to provide text based serialization for the target flags.

This commit can serialize only the X86 target flags, and the target flags for
the other targets will be serialized in the follow-up commits.

Reviewers: Duncan P. N. Exon Smith

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

9 years ago[llvm-objdump] Add missing call to exit(1).
Davide Italiano [Thu, 6 Aug 2015 00:18:52 +0000 (00:18 +0000)]
[llvm-objdump] Add missing call to exit(1).

Reported by: Rafael Espindola.

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

9 years agoRevert "Make sure all temporary files get created under %T."
Frederic Riss [Wed, 5 Aug 2015 23:53:38 +0000 (23:53 +0000)]
Revert "Make sure all temporary files get created under %T."

This reverts commit r244163. The workaround shouldn't be necessary
after r244172, and moreover the commit was slightly buggy as it
dis a simple mkdir without removing the directory first, which could
cause 'File exists' errors.

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

9 years agoValueMapper: Rotate distinct node remapping algorithm
Duncan P. N. Exon Smith [Wed, 5 Aug 2015 23:52:42 +0000 (23:52 +0000)]
ValueMapper: Rotate distinct node remapping algorithm

Rotate the algorithm for remapping distinct nodes in order to simplify
how uniquing cycles get resolved.  This removes some of the recursion,
and, most importantly, exposes all uniquing cycles at the top-level.
Besides being a little more efficient -- temporary MDNodes won't live as
long -- the clearer logic should help protect against bugs like those
fixed in r243961 and r243976.

What are uniquing cycles?  Why do they present challenges when remapping
metadata?

    !0 = !{!1}
    !1 = !{!0}

!0 and !1 form a simple uniquing cycle.  When remapping from one
metadata graph to another, every uniquing cycle gets "duplicated"
through a dance:

    !0-temp = !{!1?}     ; map(!0): clone !0, VM[!0] = !0-temp
    !1-temp = !{!0?}     ; ..map(!1): clone !1, VM[!1] = !1-temp
    !1-temp = !{!0-temp} ; ..map(!1): remap !1's operands
    !2      = !{!0-temp} ; ..map(!1): uniquify: !1-temp => !2
    !0-temp = !{!2}      ; map(!0): remap !0's operands
    !3      = !{!2}      ; map(!0): uniquify: !0-temp => !3

    ; Result
    !2 = !{!3}
    !3 = !{!2}

(In the two "uniquify" steps above, the operands of !X-temp are compared
to the operands of !X.  If they're the same, then !X-temp gets RAUW'ed
to !X; if they're different, then !X-temp is promoted to a new unique
node.  The latter case always hits in for uniquing cycles, so we
duplicate all the nodes involved.)

Why is this a problem?  Uniquable Metadata nodes that have temporary
node as transitive operands keep RAUW support until the temporary nodes
get finalized.  With non-cycles, this happens automatically: when a
uniquable node's count of unresolved operands drops to zero, it
immediately sheds its own RAUW support (possibly triggering the same in
any node that references it).  However, uniquing cycles create a
reference cycle, and uniqued nodes that transitively reference a
uniquing cycle are "stuck" in an unresolved state until someone calls
`MDNode::resolveCycles()` on a node in the unresolved subgraph.

Distinct nodes should help here (and mostly do): since they aren't
uniqued anywhere, they are guaranteed not to be RAUW'ed.  They
effectively form a barrier between uniqued nodes, breaking some uniquing
cycles, and shielding uniqued nodes from uniquing cycles.

Unfortunately, with this barrier in place, the unresolved subgraph(s)
can be disjoint from the top-level node.  The mapping algorithm needs to
find at least one representative from each disjoint subgraph.  But which
nodes are *stuck*, and which will get resolved automatically?  And which
nodes are in the unresolved subgraph?  The old logic was conservative.

This commit rotates the logic for distinct nodes, so that we have access
to unresolved nodes at the top-level call to `llvm::MapMetadata()`.
Each time we return to the top-level, we know that all temporaries have
been RAUW'ed away.  Here, it's safe (and necessary) to call
`resolveCycles()` immediately on unresolved operands.

This should also perform better than the old algorithm.  The recursion
stack is shorter, temporary nodes don't live as long, and there are
fewer tracking references to unresolved nodes.  As the debug info graph
introduces more 'distinct' nodes, remapping should incrementally get
cheaper and cheaper.

Aside from possible performance improvements (and reduced cruft in the
`LLVMContext`), there should be no functionality change here.

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

9 years ago[libFuzzer] avoid build warnings in non-assert build (useful warning in this case)
Kostya Serebryany [Wed, 5 Aug 2015 23:44:42 +0000 (23:44 +0000)]
[libFuzzer] avoid build warnings in non-assert build (useful warning in this case)

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

9 years agoAdd a stat to show how often the limit to decompose GEPs in BasicAA is reached.
Wei Mi [Wed, 5 Aug 2015 23:40:30 +0000 (23:40 +0000)]
Add a stat to show how often the limit to decompose GEPs in BasicAA is reached.

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

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

9 years ago[dsymutil] Do not create temporary files in -no-output mode.
Frederic Riss [Wed, 5 Aug 2015 23:33:50 +0000 (23:33 +0000)]
[dsymutil] Do not create temporary files in -no-output mode.

The files were never written to and then deleted, but they were created
nonetheless. To prevent that, create a wrapper around the 2 variants of
createUniqueFile and use the one that only does an access(Exists) call
to check for name unicity in -no-output mode.

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

9 years ago[dsymutil] Update source used to generate test binary.
Frederic Riss [Wed, 5 Aug 2015 23:33:45 +0000 (23:33 +0000)]
[dsymutil] Update source used to generate test binary.

Forgot to include that in the last commit.

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

9 years agoValueMapper: Simplify remap() helper function, NFC
Duncan P. N. Exon Smith [Wed, 5 Aug 2015 23:22:34 +0000 (23:22 +0000)]
ValueMapper: Simplify remap() helper function, NFC

Rename `remap()` to `remapOperands()`, and restrict its contract to
remapping operands.  Previously, it also called `mapToMetadata()`, but
this logic is hard to reason about externally.  In particular, this
refactors `mapUniquedNode()` to avoid redundant mapping calls, taking
advantage of the RAUWs that are already in place.

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

9 years agox86: NFC remove needless InstrCompiler cast
JF Bastien [Wed, 5 Aug 2015 23:15:37 +0000 (23:15 +0000)]
x86: NFC remove needless InstrCompiler cast

Summary: The casts from String to PatFrag weren't needed if we instead provided an SDNode. This fix was suggested by @pete in D11382.

Subscribers: pete, llvm-commits

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

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

9 years ago[NVPTX] Use LDG for pointer induction variables.
Bjarke Hammersholt Roune [Wed, 5 Aug 2015 23:11:57 +0000 (23:11 +0000)]
[NVPTX] Use LDG for pointer induction variables.

More specifically, make NVPTXISelDAGToDAG able to emit cached loads (LDG) for pointer induction variables.

Also fix latent bug where LDG was not restricted to kernel functions. I believe that this could not be triggered so far since we do not currently infer that a pointer is global outside a kernel function, and only loads of global pointers are considered for cached loads.

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

9 years ago[libFuzzer] in dfsan mode, set labels every time we start recording traces as opposed...
Kostya Serebryany [Wed, 5 Aug 2015 23:02:57 +0000 (23:02 +0000)]
[libFuzzer] in dfsan mode, set labels every time we start recording traces as opposed to doing it at process startup. This ensures that the labels are fresh.

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

9 years agoAdd a TrailingObjects template class.
James Y Knight [Wed, 5 Aug 2015 22:57:34 +0000 (22:57 +0000)]
Add a TrailingObjects template class.

This is intended to help support the idiom of a class that has some
other objects (or multiple arrays of different types of objects)
appended on the end, which is used quite heavily in clang.

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

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

9 years agoMake sure all temporary files get created under %T.
Artem Belevich [Wed, 5 Aug 2015 22:54:36 +0000 (22:54 +0000)]
Make sure all temporary files get created under %T.

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

9 years ago[dsymutil] Add support for the -arch option.
Frederic Riss [Wed, 5 Aug 2015 22:33:28 +0000 (22:33 +0000)]
[dsymutil] Add support for the -arch option.

This option allows to select a subset of the architectures when
performing a universal binary link. The filter is done completely
in the mach-o specific part of the code.

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

9 years agoFix Windows test failure with triple instead of using the native OS
Reid Kleckner [Wed, 5 Aug 2015 22:27:08 +0000 (22:27 +0000)]
Fix Windows test failure with triple instead of using the native OS

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

9 years agoIf the "CodeView" module flag is set, emit codeview instead of DWARF
Reid Kleckner [Wed, 5 Aug 2015 22:26:20 +0000 (22:26 +0000)]
If the "CodeView" module flag is set, emit codeview instead of DWARF

Summary:
Emit both DWARF and CodeView if "CodeView" and "Dwarf Version" module
flags are set.

Reviewers: majnemer

Subscribers: llvm-commits

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

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

9 years agoMIR Serialization: Serialize the machine operand's offset.
Alex Lorenz [Wed, 5 Aug 2015 22:26:15 +0000 (22:26 +0000)]
MIR Serialization: Serialize the machine operand's offset.

This commit serializes the offset for the following operands: target index,
global address, external symbol, constant pool index, and block address.

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

9 years agoAdd <numeric> header for use of std::accumulate().
Cong Hou [Wed, 5 Aug 2015 22:13:43 +0000 (22:13 +0000)]
Add <numeric> header for use of std::accumulate().

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

9 years agoDivide the primitive size in bits by eight so the initial load's alignment is in
Richard Diamond [Wed, 5 Aug 2015 22:10:57 +0000 (22:10 +0000)]
Divide the primitive size in bits by eight so the initial load's alignment is in
bytes as expected. Tested with the included unit test.

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

9 years agoRecord whether the weights on out-edges from a MBB are normalized.
Cong Hou [Wed, 5 Aug 2015 22:01:20 +0000 (22:01 +0000)]
Record whether the weights on out-edges from a MBB are normalized.

1. Create a utility function normalizeEdgeWeights() in MachineBranchProbabilityInfo that normalizes a list of edge weights so that the sum of then can fit in uint32_t.
2. Provide an interface in MachineBasicBlock to normalize its successors' weights.
3. Add a flag in MachineBasicBlock that tracks whether its successors' weights are normalized.
4. Provide an overload of getSumForBlock that accepts a non-const pointer to a MBB so that it can force normalizing this MBB's successors' weights.
5. Update several uses of getSumForBlock() by eliminating the once needed weight scale.

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

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

9 years ago[libFuzzer] add option -report_slow_units=Nsec to control when slow units are printed
Kostya Serebryany [Wed, 5 Aug 2015 21:43:48 +0000 (21:43 +0000)]
[libFuzzer] add option -report_slow_units=Nsec to control when slow units are printed

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

9 years ago[libFuzzer] add a missing test file
Kostya Serebryany [Wed, 5 Aug 2015 21:32:13 +0000 (21:32 +0000)]
[libFuzzer] add a missing test file

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

9 years agoDrop the defaulted CallGraph move ctor, since it's unused and MSVC doesn't support...
David Blaikie [Wed, 5 Aug 2015 21:16:46 +0000 (21:16 +0000)]
Drop the defaulted CallGraph move ctor, since it's unused and MSVC doesn't support defaulted move ops

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

9 years agoReplace &vector[0] with vector.data() to avoid invalid dereference caught by debug...
Nick Lewycky [Wed, 5 Aug 2015 21:16:02 +0000 (21:16 +0000)]
Replace &vector[0] with vector.data() to avoid invalid dereference caught by debug STL. Also move a '*' for consistency and fix an 80-col violation.

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

9 years ago-Wdeprecated: Remove some dead code that was relying on a questionable (rule-of-3...
David Blaikie [Wed, 5 Aug 2015 21:15:48 +0000 (21:15 +0000)]
-Wdeprecated: Remove some dead code that was relying on a questionable (rule-of-3-violating) copy ctor in MCInstPrinter

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

9 years ago[LoopUnswitch] Preserve make.implicit metadata for unswitched conditions
Chen Li [Wed, 5 Aug 2015 21:13:26 +0000 (21:13 +0000)]
[LoopUnswitch] Preserve make.implicit metadata for unswitched conditions

Summary: This patch adds support to preserve make.implicit metadata for unswitched conditions in loop pre-header.

Reviewers: sanjoy, weimingz

Subscribers: mcrosier, llvm-commits

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

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

9 years ago[Hexagon] Edit a comment. NFC
Krzysztof Parzyszek [Wed, 5 Aug 2015 21:08:26 +0000 (21:08 +0000)]
[Hexagon] Edit a comment. NFC

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

9 years ago-Wdeprecated clean by making LogBuilder move constructible so it can be returned...
David Blaikie [Wed, 5 Aug 2015 21:06:50 +0000 (21:06 +0000)]
-Wdeprecated clean by making LogBuilder move constructible so it can be returned by value (in DifferenceEngine::logf)

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

9 years agox86 atomic: optimize a.store(reg op a.load(acquire), release)
JF Bastien [Wed, 5 Aug 2015 21:04:59 +0000 (21:04 +0000)]
x86 atomic: optimize a.store(reg op a.load(acquire), release)

Summary: PR24191 finds that the expected memory-register operations aren't generated when relaxed { load ; modify ; store } is used. This is similar to PR17281 which was addressed in D4796, but only for memory-immediate operations (and for memory orderings up to acquire and release). This patch also handles some floating-point operations.

Reviewers: reames, kcc, dvyukov, nadav, morisset, chandlerc, t.p.northover, pete

Subscribers: llvm-commits

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

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

9 years ago[PM] Remove a failed attempt to port the CallGraph analysis to the new
Chandler Carruth [Wed, 5 Aug 2015 21:04:31 +0000 (21:04 +0000)]
[PM] Remove a failed attempt to port the CallGraph analysis to the new
pass manager.

This never worked, and won't ever work. It was actually why I ended up
building the LazyCallGraph set of code which is more more effectively
wired up to the new pass manager. This accidentally got committed when
I was trying to land a cleanup of the code organization in the other
parts of this file. =[ My bad, but fortunately Dave was keen eyed enough
to spot that this code couldn't possibly work. =]

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

9 years agoUpdate GettingStarted docs list of LLVM_TARGETS_TO_BUILD to match cmake.
Pete Cooper [Wed, 5 Aug 2015 20:55:53 +0000 (20:55 +0000)]
Update GettingStarted docs list of LLVM_TARGETS_TO_BUILD to match cmake.

Since the docs were written, we've added the BPF backend to the list.
Updating the docs to take this in to account.  Also sorted them to
match cmake while I was changing these lines.

Reviewed by Chris B.

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

9 years ago-Wdeprecated cleanup: Make CallGraph movable by default by using unique_ptr members...
David Blaikie [Wed, 5 Aug 2015 20:55:50 +0000 (20:55 +0000)]
-Wdeprecated cleanup: Make CallGraph movable by default by using unique_ptr members rather than raw pointers.

The only place that tries to return a CallGraph by value
(CallGraphAnalysis::run) doesn't seem to be used right now, but it's a
reasonable bit of cleanup anyway.

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

9 years agoRevert "Fix MO's analyzePhysReg, it was confusing sub- and super-registers. Problem...
JF Bastien [Wed, 5 Aug 2015 20:53:56 +0000 (20:53 +0000)]
Revert "Fix MO's analyzePhysReg, it was confusing sub- and super-registers. Problem pointed out by Michael Hordijk."

I mistakenly committed the patch for D6629, and was trying to commit another. Reverting until it gets proper signoff.

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

9 years agoFix MO's analyzePhysReg, it was confusing sub- and super-registers. Problem pointed...
JF Bastien [Wed, 5 Aug 2015 20:49:46 +0000 (20:49 +0000)]
Fix MO's analyzePhysReg, it was confusing sub- and super-registers. Problem pointed out by Michael Hordijk.

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

9 years ago-Wdeprecated-clean: Remove uses of throw() in favor of noexcept
David Blaikie [Wed, 5 Aug 2015 20:38:57 +0000 (20:38 +0000)]
-Wdeprecated-clean: Remove uses of throw() in favor of noexcept

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

9 years agoNFC.
Cong Hou [Wed, 5 Aug 2015 20:30:11 +0000 (20:30 +0000)]
NFC.

Convert comments in MachineBasicBlock.h into new style.

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

9 years ago-Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated...
David Blaikie [Wed, 5 Aug 2015 20:20:29 +0000 (20:20 +0000)]
-Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11

LoadedObjectInfo was depending on the implicit copy ctor in the presence
of a user-declared dtor. Default (and protect) it in the base class and
make the devired classes final to avoid any risk of a public API that
would enable slicing.

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

9 years agoRevert "Fix `llvm-config` to emit the linker flag for the combined shared object...
Richard Diamond [Wed, 5 Aug 2015 20:03:26 +0000 (20:03 +0000)]
Revert "Fix `llvm-config` to emit the linker flag for the combined shared object built by autoconfig/make instead of the individual components."

It seems I was wrong thinking `autoconf`/`make` only installed shared libraries if configured with `--enable-shared`, even if `--disable-static` is present. I'll re-address with a followup patch.

This reverts commit r243297 for causing PR#24154.

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

9 years agoWrite access test.
Richard Diamond [Wed, 5 Aug 2015 19:40:39 +0000 (19:40 +0000)]
Write access test.

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

9 years agoMIR Parser: Report an error when parsing large immediate operands.
Alex Lorenz [Wed, 5 Aug 2015 19:03:42 +0000 (19:03 +0000)]
MIR Parser: Report an error when parsing large immediate operands.

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

9 years agoMIR Serialization: Serialize the typed immediate integer machine operands.
Alex Lorenz [Wed, 5 Aug 2015 18:52:21 +0000 (18:52 +0000)]
MIR Serialization: Serialize the typed immediate integer machine operands.

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

9 years ago[Unroll] Switch to using 'int' cost types in preparation for a somewhat
Chandler Carruth [Wed, 5 Aug 2015 18:46:21 +0000 (18:46 +0000)]
[Unroll] Switch to using 'int' cost types in preparation for a somewhat
more involved change to the cost computation pattern.

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

9 years ago[dsymutil] Fix test patterns.
Frederic Riss [Wed, 5 Aug 2015 18:45:13 +0000 (18:45 +0000)]
[dsymutil] Fix test patterns.

Depending on the filesystem paths, the YAML dump might quote paths.
Account for that in the regex patterns.

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

9 years agoMIR Parser: Extract the IR constant parsing code into a new method. NFC.
Alex Lorenz [Wed, 5 Aug 2015 18:44:00 +0000 (18:44 +0000)]
MIR Parser: Extract the IR constant parsing code into a new method. NFC.

This commit extracts the code that parses the IR constant values into a new
method named 'parseIRConstant' in the 'MIParser' class. The new method will
be reused by the code that parses the typed integer immediate machine operands.

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

9 years ago[Hexagon] Implement TargetTransformInfo for Hexagon
Krzysztof Parzyszek [Wed, 5 Aug 2015 18:35:37 +0000 (18:35 +0000)]
[Hexagon] Implement TargetTransformInfo for Hexagon

Author: Brendon Cahoon <bcahoon@codeaurora.org>

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

9 years ago[dsymutil] Implement support for handling mach-o universal binaries as main input...
Frederic Riss [Wed, 5 Aug 2015 18:27:44 +0000 (18:27 +0000)]
[dsymutil] Implement support for handling mach-o universal binaries as main input/output.

The DWARF linker isn't touched by this, the implementation links
individual files and merges them together into a fat binary by
calling out to the 'lipo' utility.

The main change is that the MachODebugMapParser can now return
multiple debug maps for a single binary.

The test just verifies that lipo would be invoked correctly, but
doesn't actually generate a binary. This mimics the way clang
tests its external iplatform tools integration.

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

9 years ago[dsymutil] Introduce exit helper. NFC.
Frederic Riss [Wed, 5 Aug 2015 18:27:38 +0000 (18:27 +0000)]
[dsymutil] Introduce exit helper. NFC.

llvm-dsymutil will start creating temporary files in a followup
commit. To ease the correct cleanup of this files, introduce a
helper called to exit dsymutil.

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

9 years ago[dsymutil] Split some logic into a helper function. NFC
Frederic Riss [Wed, 5 Aug 2015 18:27:34 +0000 (18:27 +0000)]
[dsymutil] Split some logic into a helper function. NFC

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

9 years ago[libFuzzer] use data-flow feedback from strcmp
Kostya Serebryany [Wed, 5 Aug 2015 18:23:01 +0000 (18:23 +0000)]
[libFuzzer] use data-flow feedback from strcmp

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

9 years agoMIR Parser: Report an error when parsing duplicate register flags.
Alex Lorenz [Wed, 5 Aug 2015 18:09:03 +0000 (18:09 +0000)]
MIR Parser: Report an error when parsing duplicate register flags.

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

9 years ago[TTI] Make the cost APIs in TargetTransformInfo consistently use 'int'
Chandler Carruth [Wed, 5 Aug 2015 18:08:10 +0000 (18:08 +0000)]
[TTI] Make the cost APIs in TargetTransformInfo consistently use 'int'
rather than 'unsigned' for their costs.

For something like costs in particular there is a natural "negative"
value, that of savings or saved cost. As a consequence, there is a lot
of code that subtracts or creates negative values based on cost, all of
which is prone to awkwardness or bugs when dealing with an unsigned
type. Similarly, we *never* want these values to wrap, as that would
cause Very Bad code generation (likely percieved as an infinite loop as
we try to emit over 2^32 instructions or some such insanity).

All around 'int' seems a much better fit for these basic metrics. I've
added asserts to ensure that at least the TTI interface never returns
negative numbers here. If we ever have a use case for negative numbers,
we can remove this, but this way a bug where someone used '-1' to
produce a 'very large' cost will be caught by the assert.

This passes all tests, and is also UBSan clean.

No functional change intended.

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

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

9 years ago[GMR] Teach the conservative path of GMR to catch even more easy cases.
Chandler Carruth [Wed, 5 Aug 2015 17:58:30 +0000 (17:58 +0000)]
[GMR] Teach the conservative path of GMR to catch even more easy cases.

In PR24288 it was pointed out that the easy case of a non-escaping
global and something that *obviously* required an escape sometimes is
hidden behind PHIs (or selects in theory). Because we have this binary
test, we can easily just check that all possible input values satisfy
the requirement. This is done with a (very small) recursion through PHIs
and selects. With this, the specific example from the PR is correctly
folded by GVN.

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

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

9 years agoMIR Serialization: Serialize the 'early-clobber' register operand flag.
Alex Lorenz [Wed, 5 Aug 2015 17:49:03 +0000 (17:49 +0000)]
MIR Serialization: Serialize the 'early-clobber' register operand flag.

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

9 years agoMove BB succ_iterator to be inside TerminatorInst. NFC.
Pete Cooper [Wed, 5 Aug 2015 17:43:01 +0000 (17:43 +0000)]
Move BB succ_iterator to be inside TerminatorInst.  NFC.

To get the successors of a BB we currently do successors(BB) which
ultimately walks the successors of the BB's terminator.

This moves the iterator to TerminatorInst as thats what we're actually
using to do the iteration, and adds a member function to TerminatorInst
to allow us to iterate directly over successors given an instruction.

For example, we can now do

  for (auto *Succ : BI->successors())

instead of

  for (unsigned i = 0, e = BI->getNumSuccessors(); i != e; ++i)

Reviewed by Tobias Grosser.

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

9 years agoMIR Serialization: Serialize the 'debug-use' register operand flag.
Alex Lorenz [Wed, 5 Aug 2015 17:41:17 +0000 (17:41 +0000)]
MIR Serialization: Serialize the 'debug-use' register operand flag.

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

9 years agoMIR Parser: Simplify the handling of quoted tokens. NFC.
Alex Lorenz [Wed, 5 Aug 2015 17:35:55 +0000 (17:35 +0000)]
MIR Parser: Simplify the handling of quoted tokens. NFC.

The machine instructions lexer should not expose the difference between quoted
and unquoted tokens to the parser.

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

9 years ago[AArch64] Register AArch64DeadRegisterDefinition pass with LLVM pass manager.
Chad Rosier [Wed, 5 Aug 2015 17:35:34 +0000 (17:35 +0000)]
[AArch64] Register AArch64DeadRegisterDefinition pass with LLVM pass manager.

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

9 years ago[Sparc] Fix disassembly of popc instruction.
James Y Knight [Wed, 5 Aug 2015 17:00:30 +0000 (17:00 +0000)]
[Sparc] Fix disassembly of popc instruction.

And add tests.

Patch by David Wiberg!

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

9 years agoAMDGPU/SI: Remove EXECReg
Matt Arsenault [Wed, 5 Aug 2015 16:42:57 +0000 (16:42 +0000)]
AMDGPU/SI: Remove EXECReg

For the same reasons as the other physical registers.

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

9 years agoAMDGPU: Remove SCCReg.
Matt Arsenault [Wed, 5 Aug 2015 16:42:54 +0000 (16:42 +0000)]
AMDGPU: Remove SCCReg.

These should be handled as a physical register rather
than a virtual register class with one member.

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

9 years ago[AArch64] Register (existing) AArch64BranchRelaxation pass with LLVM pass manager.
Chad Rosier [Wed, 5 Aug 2015 16:12:10 +0000 (16:12 +0000)]
[AArch64] Register (existing) AArch64BranchRelaxation pass with LLVM pass manager.

Summary: Among other things, this allows -print-after-all/-print-before-all to
dump IR around this pass.

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

9 years agoForce the MachO generated for Darwin to have VERSION_MIN load command
Steven Wu [Wed, 5 Aug 2015 15:36:38 +0000 (15:36 +0000)]
Force the MachO generated for Darwin to have VERSION_MIN load command

On Darwin, it is required to stamp the object file with VERSION_MIN load
command. This commit will provide a VERSRION_MIN load command to the
MachO file that doesn't specify the version itself by inferring from
Target Triple.

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

9 years agotest-release.sh: Fix naming of OpenMP runtime tarball
Hans Wennborg [Wed, 5 Aug 2015 15:36:07 +0000 (15:36 +0000)]
test-release.sh: Fix naming of OpenMP runtime tarball

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

9 years ago[AArch64] Make the naming of the Address Type Promotion pass consistent.
Chad Rosier [Wed, 5 Aug 2015 15:32:23 +0000 (15:32 +0000)]
[AArch64] Make the naming of the Address Type Promotion pass consistent.

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

9 years ago[AArch64] Register (existing) AArch64AdvSIMDScalar pass with LLVM pass manager.
Chad Rosier [Wed, 5 Aug 2015 15:18:58 +0000 (15:18 +0000)]
[AArch64] Register (existing) AArch64AdvSIMDScalar pass with LLVM pass manager.

Summary: Among other things, this allows -print-after-all/-print-before-all to
dump IR around this pass.

IIRC, this pass is off by default, but it's still helpful when debugging.

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

9 years agorevert r243687: enable fast-math-flag propagation to DAG nodes
Sanjay Patel [Wed, 5 Aug 2015 15:12:03 +0000 (15:12 +0000)]
revert r243687: enable fast-math-flag propagation to DAG nodes

We can't propagate FMF partially without breaking DAG-level CSE. We either need to
relax CSE to account for mismatched FMF as a temporary work-around or fully propagate
FMF throughout the DAG.

Surprisingly, there are no existing regression tests for this, but here's an example:

  define float @fmf(float %a, float %b) {
    %mul1 = fmul fast float %a, %b
    %nega = fsub fast float 0.0, %a
    %mul2 = fmul fast float %nega, %b
    %abx2 = fsub fast float %mul1, %mul2
    ret float %abx2
  }

$ llc -o - badflags.ll -march=x86-64 -mattr=fma -enable-unsafe-fp-math -enable-fmf-dag=0
...
    vmulss    %xmm1, %xmm0, %xmm0
    vaddss    %xmm0, %xmm0, %xmm0
    retq

$ llc -o - badflags.ll -march=x86-64 -mattr=fma -enable-unsafe-fp-math -enable-fmf-dag=1
...
    vmulss    %xmm1, %xmm0, %xmm2
    vfmadd213ss    %xmm2, %xmm1, %xmm0  <--- failed to recognize that (a * b) was already calculated
    retq

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

9 years agoMake this less error prone by using a #define. NFC.
Chad Rosier [Wed, 5 Aug 2015 14:48:44 +0000 (14:48 +0000)]
Make this less error prone by using a #define. NFC.

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

9 years ago[AArch64] Register (existing) AArch64ExpandPseudo pass with LLVM pass manager.
Chad Rosier [Wed, 5 Aug 2015 14:22:53 +0000 (14:22 +0000)]
[AArch64] Register (existing) AArch64ExpandPseudo pass with LLVM pass manager.

Summary: Among other things, this allows -print-after-all/-print-before-all to
dump IR around this pass.

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

9 years ago[AA] Use CallSite cast idiom. No functionality change.
Benjamin Kramer [Wed, 5 Aug 2015 14:16:44 +0000 (14:16 +0000)]
[AA] Use CallSite cast idiom. No functionality change.

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

9 years ago[YAMLTraits] Use StringRef::copy. No functionality change.
Benjamin Kramer [Wed, 5 Aug 2015 14:16:38 +0000 (14:16 +0000)]
[YAMLTraits] Use StringRef::copy. No functionality change.

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

9 years ago[IR] Simplify code with ArrayRef::copy. No functionality change.
Benjamin Kramer [Wed, 5 Aug 2015 14:16:28 +0000 (14:16 +0000)]
[IR] Simplify code with ArrayRef::copy. No functionality change.

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

9 years ago[AArch64] Register (existing) AArch64LoadStoreOpt pass with LLVM pass manager.
Chad Rosier [Wed, 5 Aug 2015 13:44:51 +0000 (13:44 +0000)]
[AArch64] Register (existing) AArch64LoadStoreOpt pass with LLVM pass manager.

Summary: Among other things, this allows -print-after-all/-print-before-all to
dump IR around this pass.

This is the AArch64 version of r243052.

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

9 years agoUpdate comment. NFC.
Chad Rosier [Wed, 5 Aug 2015 12:40:13 +0000 (12:40 +0000)]
Update comment. NFC.

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

9 years agoDrop unnecessary static_cast.
Rafael Espindola [Wed, 5 Aug 2015 11:53:59 +0000 (11:53 +0000)]
Drop unnecessary static_cast.

ELFT::TargetEndianness already has the correct type.

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

9 years agoARMISelDAGToDAG.cpp had this self-contradictory code:
Artyom Skrobov [Wed, 5 Aug 2015 11:02:14 +0000 (11:02 +0000)]
ARMISelDAGToDAG.cpp had this self-contradictory code:

  return StringSwitch<int>(Flags)
          .Case("g", 0x1)
          .Case("nzcvq", 0x2)
          .Case("nzcvqg", 0x3)
          .Default(-1);
...

  // The _g and _nzcvqg versions are only valid if the DSP extension is
  // available.
  if (!Subtarget->hasThumb2DSP() && (Mask & 0x2))
    return -1;

ARMARM confirms that the comment is right, and the code was wrong.

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

9 years ago[ArrayRefTest] Work around a GCC 4.8 internal compiler error.
Benjamin Kramer [Wed, 5 Aug 2015 09:39:41 +0000 (09:39 +0000)]
[ArrayRefTest] Work around a GCC 4.8 internal compiler error.

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

9 years ago[InstCombine] Added more specific SSE2/AVX2 vector shift tests.
Simon Pilgrim [Wed, 5 Aug 2015 08:21:38 +0000 (08:21 +0000)]
[InstCombine] Added more specific SSE2/AVX2 vector shift tests.

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

9 years agoFixed line endings.
Simon Pilgrim [Wed, 5 Aug 2015 08:18:00 +0000 (08:18 +0000)]
Fixed line endings.

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

9 years ago[MachineCombiner] Don't use the opcode-only form of computeInstrLatency
Hal Finkel [Wed, 5 Aug 2015 07:45:28 +0000 (07:45 +0000)]
[MachineCombiner] Don't use the opcode-only form of computeInstrLatency

In r242277, I updated the MachineCombiner to work with itineraries, but I
missed a call that is scheduling-model-only (the opcode-only form of
computeInstrLatency). Using the form that takes an MI* allows this to work with
itineraries (and should be NFC for subtargets with scheduling models).

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

9 years ago[llvm-objdump] Call exit(1) on error, i.e. fail early.
Davide Italiano [Wed, 5 Aug 2015 07:18:31 +0000 (07:18 +0000)]
[llvm-objdump] Call exit(1) on error, i.e. fail early.

Previously we kept going on partly corrupted input, which might result
in garbage being printed, or even worse, random crashes.
Rafael mentioned that this is the GNU behavior as well, but after some
discussion we both agreed it's probably better to emit a reasonable
error message and exit. As a side-effect of this commit, now we don't
rely on global state for error codes anymore. objdump was the last tool
in the toolchain which needed to be converted. Hopefully the old behavior
won't sneak into the tree again.

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

9 years agounittests/ADT/ArrayRefTest.cpp: Suppress r243995 on g++-4.8 for now to unbreak bots.
NAKAMURA Takumi [Wed, 5 Aug 2015 06:11:23 +0000 (06:11 +0000)]
unittests/ADT/ArrayRefTest.cpp: Suppress r243995 on g++-4.8 for now to unbreak bots.

For example of mingw-w64-g++-4.8.1,

  llvm/unittests/ADT/ArrayRefTest.cpp: In member function 'virtual void {anonymous}::ArrayRefTest_AllocatorCopy_Test::TestBody()':
  llvm/unittests/ADT/ArrayRefTest.cpp:56:40: internal compiler error: in count_type_elements, at expr.c:5523
     } Array3Src[] = {{"hello"}, {"world"}};
                                          ^
  Please submit a full bug report,
  with preprocessed source if appropriate.

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

9 years agoWindows/COM.inc: Fix emacs mode in the first line.
NAKAMURA Takumi [Wed, 5 Aug 2015 06:11:08 +0000 (06:11 +0000)]
Windows/COM.inc: Fix emacs mode in the first line.

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

9 years agoTemporarily revert r244012 while we see if it's really necessary.
Eric Christopher [Wed, 5 Aug 2015 05:32:22 +0000 (05:32 +0000)]
Temporarily revert r244012 while we see if it's really necessary.
Add a comment explaining the current theory as to why we'd need
the -lole32 on the link line.

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