Commit Graph

63257 Commits

Author SHA1 Message Date
Peter Collingbourne
835738ce54 Kill some duplicated code for removing unreachable BBs.
This moves removeUnreachableBlocksFromFn from SimplifyCFGPass.cpp
to Utils/Local.cpp and uses it to replace the implementation of
llvm::removeUnreachableBlocks, which appears to do a strict subset
of what removeUnreachableBlocksFromFn does.

Differential Revision: http://llvm-reviews.chandlerc.com/D1334

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188119 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 22:47:24 +00:00
Peter Collingbourne
aaae6e9cb8 DataFlowSanitizer: Remove unreachable BBs so IR continues to verify
under the args ABI.

Differential Revision: http://llvm-reviews.chandlerc.com/D1316

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188113 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 21:42:53 +00:00
Reed Kotler
1e07de3529 Add another intrinsic that LLVM gives an incorrect prototype to.
I need to go through all the runtime routine list and see if there
are any more I need to add for mips16 floating point. Prototypes must
be correct or else I don't know to add a helper function call.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188106 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 21:33:41 +00:00
Michael Gottesman
236e389be4 [stackprotector] Simplify SP Pass so that we emit different fail basic blocks for each fail condition.
This patch decouples the stack protector pass so that we can support stack
protector implementations that do not use the IR level generated stack protector
fail basic block.

No codesize increase is caused by this change since the MI level tail merge pass
properly merges together the fail condition blocks (see the updated test).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188105 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 21:26:18 +00:00
Jakub Staszak
4c71064129 Mark obviously const methods. Also use reference for parameters when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188103 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 20:53:48 +00:00
Benjamin Kramer
fc6434a73d Add a overload to CostTable which allows it to infer the size of the table.
Use it to avoid repeating ourselves too often. Also store MVT::SimpleValueType
in the TTI tables so they can be statically initialized, MVT's constructors
create bloated initialization code otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188095 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 19:33:32 +00:00
David Blaikie
8328b6932f DebugInfo: provide the ability to add members to a class after it has been constructed
This is necessary to allow Clang to only emit implicit members when
there is code generated for them, rather than whenever they are ODR
used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188082 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 17:17:12 +00:00
Benjamin Kramer
b0e8d37240 Make helper static and fix formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188074 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 14:44:41 +00:00
Mihai Popa
04b03fac11 This fixes the Thumb2 CPS assembly syntax.
In Thumb1, only one variant is supported: CPS{effect} {flags}

Thumb2 supports three:
CPS{effect}.W {flags}
CPS{effect} {flags} {mode}
CPS {mode}

Canonically, .W should be used only when ambiguity is present between encodings of different width.
The wide suffix is still accepted for the latter two forms via aliases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188071 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 13:52:32 +00:00
Mihai Popa
e921f32353 Fix assembling of Thumb2 branch instructions.
The long encoding for Thumb2 unconditional branches is broken.
Additionally, there is no range checking for target operands; as such 
for instructions originating in assembly code, only short Thumb encodings
are generated, regardless of the bitsize needed for the offset.

Adding range checking is non trivial due to the representation of Thumb
branch instructions. There is no true difference between conditional and
unconditional branches in terms of operands and syntax - even unconditional
branches have a predicate which is expected to match that of the IT block
they are in. Yet, the encodings and the permitted size of the offset differ.

Due to this, for any mnemonic there are really 4 encodings to choose for.

The problem cannot be handled in the parser alone or by manipulating td files.
Because the parser builds first a set of match candidates and then checks them
one by one, whatever tablegen-only solution might be found will ultimately be
dependent of the parser's evaluation order. What's worse is that due to the fact
that all branches have the same syntax and the same kinds of operands, that 
order is governed by the lexicographical ordering of the names of operand 
classes...

To circumvent all this, any necessary disambiguation is added to the instruction
validation pass.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188067 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 10:38:32 +00:00
Ulrich Weigand
d25fed9827 Add back missing PPC relocation types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188064 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 09:42:14 +00:00
Richard Sandiford
6514751d12 [SystemZ] Update README
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188062 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 09:25:57 +00:00
Craig Topper
ad445a60d0 Change asserts at the top of getVectorShuffle to check that LHS and RHS have the same type as the result.
Previously the asserts were only checking that RHS and LHS were the same type and had the same element type as the result. All downstream code for ISD::VECTOR_SHUFFLE requires the types to be the same.

Also removed one unnecessary check of matched element counts that was present in the code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188051 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 04:37:24 +00:00
Hal Finkel
3d7f79a02e Set ISD::FROUND to Expand by default for all types
For most libm ISD nodes, TargetLoweringBase::initActions sets the default
scalar-type action to Expand, and leaves the vector-type action default as
Legal. This is not appropriate for the new ISD::FROUND node (which no backend
but PowerPC handles explicitly).

Fixes PR16842.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188048 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 04:13:44 +00:00
Saleem Abdulrasool
1c9cd021c8 [CodeGen] prevent abnormal on invalid attributes
Currently, when an invalid attribute is encountered on processing a .s file,
clang will abort due to llvm_unreachable.  Invalid user input should not cause
an abnormal termination of the compiler.  Change the interface to return a
boolean to indicate the failure as a first step towards improving hanlding of
malformed user input to clang.

Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188047 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 01:52:03 +00:00
Lang Hames
623f2025a7 Optimistically ignore scattered relocations in MachO in RuntimeDyld. This
un-breaks simple use cases while I work on more general support.

<rdar://problem/14487667>



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188044 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 00:57:01 +00:00
Michael J. Spencer
f5539a356c Add missing PPC64 relocation types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188031 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 23:58:18 +00:00
Eric Christopher
b8b2a03117 Update the CMake build files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188030 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 23:51:31 +00:00
Eric Christopher
0d27ca145f Move hash computation code into a separate class and file.
No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188028 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 23:45:55 +00:00
Jack Carter
d12fce1a27 Mips ELF: MicroMips direct object Little endian support.
Test included.

Patch by Zoran Jovanovich


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188024 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 23:30:40 +00:00
Michael J. Spencer
081a1941b5 [Object] Split the ELF interface into 3 parts.
* ELFTypes.h contains template magic for defining types based on endianess, size, and alignment.
* ELFFile.h defines the ELFFile class which provides low level ELF specific access.
* ELFObjectFile.h contains ELFObjectFile which uses ELFFile to implement the ObjectFile interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188022 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 22:27:13 +00:00
Akira Hatanaka
491d04969d [mips] Rename accumulator register classes and FP register operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188020 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 21:54:26 +00:00
Akira Hatanaka
7af40bfa66 [mips] Mark pseudo instructions as code-gen only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188017 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 21:44:39 +00:00
Akira Hatanaka
94a88c49b0 [mips] Delete register class HWRegs64.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188016 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 21:37:32 +00:00
David Fang
d76adee1b2 cast fix to appease buildbot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188014 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 21:29:30 +00:00
Arnold Schwaighofer
9b19dfc2e0 Revert "Reapply r185872 now that the address sanitizer has been changed to support this."
This reverts commit r187939. It broke an O0 build of a spec benchmark.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188012 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 21:04:16 +00:00
David Fang
d4f9d05fde initial draft of PPCMachObjectWriter.cpp
this records relocation entries in the mach-o object file
for PIC code generation.
tested on powerpc-darwin8, validated against darwin otool -rvV

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188004 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 20:14:40 +00:00
Alexey Samsonov
783a0387c5 Fix off-by-one error in Regex::isValid
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187992 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 17:32:45 +00:00
Niels Ole Salscheider
014773626d R600/SI: Implement fp32<->fp64 conversions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187988 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 16:06:15 +00:00
Niels Ole Salscheider
7114e2e7cf R600/SI: Implement sint<->fp64 conversions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187987 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 16:06:08 +00:00
Jakub Staszak
91955e78e7 Use pop_back() instead of pop_back_val() when the returned value is not used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187986 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 15:48:46 +00:00
Silviu Baranga
cee3538233 Remove the now redundant FeatureFP16 from the Cortex-A15 feature list. It was made redundant when FeatureVFP4 was added which implies FP16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187985 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 15:47:33 +00:00
Jakub Staszak
72feef14f1 Fix the comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187984 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 15:19:25 +00:00
Mihai Popa
868bed9967 The name "tCDP" isn't used anywhere else in the source code, so renaming it for consistency doesn't cause any problems.
This is the only Thumb2 instruction defined with "t" prefix; all other Thumb2 instructions have "t2" prefix (e.g. "t2CDP2" which is defined immediately afterwards).

Patch by Artyom Skrobov.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187973 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 10:20:41 +00:00
Evgeniy Stepanov
35d2102133 Disable inlining between sanitized and non-sanitized functions.
Inlining between functions with different values of sanitize_* attributes
leads to over- or under-sanitizing, which is always bad.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187967 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 08:22:39 +00:00
Eric Christopher
76ef79f410 For DW_TAG_template_type_parameter the actual passed in type could
be void and therefore not have a type entry. Only add the type if
it is non-void and provide a testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187966 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 08:09:43 +00:00
Craig Topper
eee2a11ee3 Remove AllUndef check from one of the loops in getVectorShuffle. It was already handled by the 'AllLHS && AllRHS' check after the previous loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187965 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 08:03:12 +00:00
Eric Christopher
37c107b9b5 The conversion to bool is fine here, no need to check isType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187964 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 07:40:42 +00:00
Eric Christopher
dc1363f5af Make sure that if we're going to attempt to add a type to a DIE that
the type exists.

Fix up cases where we weren't checking for optional types and add
an assert to addType to make sure we catch this in the future.

Fix up a testcase that was using the tag for DW_TAG_array_type
when it meant DW_TAG_enumeration_type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187963 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 07:40:37 +00:00
Eric Christopher
afdd1f8a85 Change variable name and reflow formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187962 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 07:40:31 +00:00
Craig Topper
01d22aaa78 Optimize mask generation for one of the DAG combiner shufflevector cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187961 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 07:38:55 +00:00
Hal Finkel
05a4d2642b PPC: Map frin to round() not nearbyint() and rint()
Making use of the recently-added ISD::FROUND, which allows for custom lowering
of round(), the PPC backend will now map frin to round(). Previously, we had
been using frin to lower nearbyint() (and rint() via some custom lowering to
handle the extra fenv flags requirements), but only in fast-math mode because
frin does not tie-to-even. Several users had complained about this behavior,
and this new mapping of frin to round is certainly more appropriate (and does
not require fast-math mode).

In effect, this reverts r178362 (and part of r178337, replacing the nearbyint
mapping with the round mapping).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187960 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 04:31:34 +00:00
David Majnemer
9706d43b56 Revert "coff also doesn't have a ReadOnlySection yet, (!)"
This reverts commit r77814.

We were sticking global constants in the .data section instead of in the
.rdata section when emitting for COFF.

This fixes PR16831.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187956 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 01:50:52 +00:00
Eric Christopher
a1eacd020f Reflow for loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187954 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 01:41:05 +00:00
Eric Christopher
3166762610 Be more rigorous about the sizes of forms and attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187953 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 01:41:00 +00:00
Alexander Kornienko
6cd4f2a2b3 Changed isPrint for U+00AD SOFT HYPHEN to return true.
Summary:
This is consistent with MacOSX implementation, and most terminals
actually display this character (checked on gnome-terminal, lxterminal, lxterm,
Terminal.app, iterm2). Actually, this is in line with the ISO Latin 1 standard
(ISO 8859-1), which defines it differently from the Unicode Standard. More
information here: http://www.cs.tut.fi/~jkorpela/shy.html

Reviewers: gribozavr, jordan_rose

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1310

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187949 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 01:10:50 +00:00
Michael Gottesman
35b6edfbea Revert "[objc-arc] Track if we encountered an additive overflow while computing {TopDown,BottomUp}PathCounts and do nothing if it occured."
This reverts commit r187941.

The commit was passing on my os x box, but it is failing on some non-osx
platforms. I do not have time to look into it now, so I am reverting and will
recommit after I figure this out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187946 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 00:41:18 +00:00
Peter Collingbourne
46c72c74cf Fix ARM build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187944 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 00:15:27 +00:00
Michael Gottesman
7f1a7d4137 [objc-arc] Track if we encountered an additive overflow while computing {TopDown,BottomUp}PathCounts and do nothing if it occured.
rdar://14590914

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187941 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 23:56:41 +00:00
Michael Gottesman
b0fd15f645 [objc-arc] Change 4 iterator methods which return const_iterators to be const methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187940 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 23:56:34 +00:00