Commit Graph

89485 Commits

Author SHA1 Message Date
Matt Beaumont-Gay 3267ad726c Pacify -Wnon-virtual-dtor
llvm-svn: 175324
2013-02-15 23:51:59 +00:00
Bill Wendling e9434778f7 Temporary revert of 175320.
llvm-svn: 175322
2013-02-15 23:22:32 +00:00
Bill Wendling a060d0efd8 Reinitialize the ivars in the subtarget.
When we're recalculating the feature set of the subtarget, we need to have the
ivars in their initial state.

llvm-svn: 175320
2013-02-15 23:18:01 +00:00
Matt Beaumont-Gay 5ae7208830 Suppress a GCC -Wunused-variable warning in -Asserts builds
llvm-svn: 175319
2013-02-15 23:12:33 +00:00
Chad Rosier 42d4e2e4ec c[ms-inline asm] It's possible to have a SizeDirective rewrite and an
Input/Output rewrite to the same location.  Make sure the SizeDirective rewrite
is performed first.  This also ensure the sort algorithm is stable.

llvm-svn: 175317
2013-02-15 22:54:16 +00:00
Derek Schuff 8878bcc9e7 If bundle alignment is enabled, do not add data to a fragment with instructions
With bundle alignment, instructions all get their own MCFragments
(unless they are in a bundle-locked group). For instructions with
fixups, this is an MCDataFragment. Emitting actual data (e.g. for
.long) attempts to re-use MCDataFragments, which we don't want int
this case since it leads to fragments which exceed the bundle size.
So, don't reuse them in this case.
Also adds a test and fixes some formatting.

llvm-svn: 175316
2013-02-15 22:50:52 +00:00
Bill Wendling 5a92eeca6b Support changing the subtarget features in ARM.
llvm-svn: 175315
2013-02-15 22:41:25 +00:00
Bill Wendling aef9c37c65 Use the 'target-features' and 'target-cpu' attributes to reset the subtarget features.
If two functions require different features (e.g., `-mno-sse' vs. `-msse') then
we want to honor that, especially during LTO. We can do that by resetting the
subtarget's features depending upon the 'target-feature' attribute.

llvm-svn: 175314
2013-02-15 22:31:27 +00:00
Chad Rosier a915bbf4a1 [ms-inline asm] Adjust the EndLoc to account for the ']'.
llvm-svn: 175312
2013-02-15 21:58:13 +00:00
Pekka Jaaskelainen 62848c9c24 Forgot to 'svn add' the LoopVectorizer tests for the new parallel loop metadata, sorry.
llvm-svn: 175311
2013-02-15 21:50:19 +00:00
Akira Hatanaka 5001be54ad [mips] Clean up class MipsCCInfo.
No functionality change intended.

llvm-svn: 175310
2013-02-15 21:45:11 +00:00
Sebastian Pop 334dd39c17 capitalize SCEV to match the current naming convention
llvm-svn: 175302
2013-02-15 21:26:36 +00:00
Akira Hatanaka 69fb3d11ec [mips] Split SelectAddr, which was used to match address patterns, into two
functions. Set AddedComplexity to determine the order in which patterns are
matched.

This simplifies selection of floating point loads/stores.

No functionality change intended.

llvm-svn: 175300
2013-02-15 21:20:45 +00:00
Reed Kotler 76c9bcd43a Remove a final dependency on the form field in tablegen; which is a remnant
of the old jit and which we don't intend to support in mips16 or micromips.
This dependency is for the testing of whether an instruction is a pseudo.

llvm-svn: 175297
2013-02-15 21:05:58 +00:00
Sebastian Pop 0377cbdc4f add ScevApplyRewriter
llvm-svn: 175294
2013-02-15 20:55:36 +00:00
Sebastian Pop 9566e6e26e add SCEVParameterRewriter
llvm-svn: 175293
2013-02-15 20:55:33 +00:00
Benjamin Kramer 1a13611a5e AsmParser: Reformat the MS asm parser to reduce nesting.
While there postpone register name printing after uniquing.
No intended functionality change.

llvm-svn: 175292
2013-02-15 20:37:21 +00:00
Paul Redmond f29ddfe93f enable SDISel sincos optimization for GNU environments
- add sincos to runtime library if target triple environment is GNU
- added canCombineSinCosLibcall() which checks that sincos is in the RTL and
  if the environment is GNU then unsafe fpmath is enabled (required to
  preserve errno)
- extended sincos-opt lit test

Reviewed by: Hal Finkel

llvm-svn: 175283
2013-02-15 18:45:18 +00:00
Jyotsna Verma a556848131 Hexagon: Set appropriate TSFlags to the loads/stores with global address to
support constant extension.

This patch doesn't introduce any functionality changes.

llvm-svn: 175280
2013-02-15 17:52:07 +00:00
Hal Finkel 89909397a1 BBVectorize: Call a DAG and DAG instead of a tree
Several functions and variable names used the term 'tree' to refer
to what is actually a DAG. Correcting this mistake will, hopefully,
prevent confusion in the future.

No functionality change intended.

llvm-svn: 175278
2013-02-15 17:20:54 +00:00
Arnaud A. de Grandmaison 1fd843eee7 Fix refactoring mistake in "Teach InstCombine to work with smaller legal types..."
llvm-svn: 175273
2013-02-15 15:18:17 +00:00
Arnaud A. de Grandmaison 61c167c62b Teach InstCombine to work with smaller legal types in icmp (shl %v, C1), C2
It enables to work with a smaller constant, which is target friendly for those which can compare to immediates.
It also avoids inserting a shift in favor of a trunc, which can be free on some targets.

This used to work until LLVM-3.1, but regressed with the 3.2 release.

llvm-svn: 175270
2013-02-15 14:35:47 +00:00
Tim Northover 2e44769ed2 AArch64: add branch fixup pass.
This is essentially a stripped-down version of the ConstandIslands pass (which
always had these two functions), providing just the features necessary for
correctness.

In particular there needs to be a way to resolve the situation where a
conditional branch's destination block ends up out of range.

This issue crops up when self-hosting for AArch64.

llvm-svn: 175269
2013-02-15 14:32:20 +00:00
Rafael Espindola 91cbcbb909 Give these callbacks hidden visibility. It is better to not export them more
than we need to and some ELF linkers complain about directly accessing symbols
with default visibility.

llvm-svn: 175268
2013-02-15 14:15:59 +00:00
Rafael Espindola 9b7d4004bc Don't make assumptions about the mangling of static functions in extern "C"
blocks. We still don't have consensus if we should try to change clang or
the standard, but llvm should work with compilers that implement the current
standard and mangle those functions.

llvm-svn: 175267
2013-02-15 14:08:43 +00:00
Kostya Serebryany a968568165 [asan] support long double on 64-bit. See https://code.google.com/p/address-sanitizer/issues/detail?id=151
llvm-svn: 175266
2013-02-15 12:46:06 +00:00
Benjamin Kramer 6ecb1e78a9 Make helpers static. Add missing include so LLVMInitializeObjCARCOpts gets C linkage.
llvm-svn: 175264
2013-02-15 12:30:38 +00:00
Tim Northover 3533ad6bbd AArch64: remove ConstantIsland pass & put literals in separate section.
This implements the review suggestion to simplify the AArch64 backend. If we
later discover that we *really* need the extra complexity of the
ConstantIslands pass for performance reasons it can be resurrected.

llvm-svn: 175258
2013-02-15 09:33:43 +00:00
Tim Northover 5466e36fb5 AArch64: refactor frame handling to use movz/movk for overlarge offsets.
In the near future litpools will be in a different section, which means that
any access to them is at least two instructions. This makes the case for a
movz/movk pair (if total offset <= 32-bits) even more compelling.

llvm-svn: 175257
2013-02-15 09:33:26 +00:00
Alexey Samsonov d5d7bb5591 clang-formatize llvm-symbolizer code
llvm-svn: 175255
2013-02-15 08:54:47 +00:00
Bill Wendling 26b95756c1 Simplify the 'operator<' for the attribute object.
llvm-svn: 175252
2013-02-15 05:25:26 +00:00
Hal Finkel 283f4f0e66 BBVectorize: Cap the number of candidate pairs in each instruction group
For some basic blocks, it is possible to generate many candidate pairs for
relatively few pairable instructions. When many (tens of thousands) of these pairs
are generated for a single instruction group, the time taken to generate and
rank the different vectorization plans can become quite large. As a result, we now
cap the number of candidate pairs within each instruction group. This is done by
closing out the group once the threshold is reached (set now at 3000 pairs).

Although this will limit the overall compile-time impact, this may not be the best
way to achieve this result. It might be better, for example, to prune excessive
candidate pairs after the fact the prevent the generation of short, but highly-connected
groups. We can experiment with this in the future.

This change reduces the overall compile-time slowdown of the csa.ll test case in
PR15222 to ~5x. If 5x is still considered too large, a lower limit can be
used as the default.

This represents a functionality change, but only for very large inputs
(thus, there is no regression test).

llvm-svn: 175251
2013-02-15 04:28:42 +00:00
Anna Zaks 08b088dbbe Revert "Simplify the attributes '<' comparison function."
This reverts commit 82c101153fe7b35bce48781fab038e1b8f31a7bd.

llvm-svn: 175250
2013-02-15 04:15:55 +00:00
Anna Zaks 269d1fa991 Revert "Fix testcase for attribute ordering."
This reverts commit 58f20a3cbfca7384fe5e25e095f18572736a4792.

llvm-svn: 175249
2013-02-15 04:15:53 +00:00
Anna Zaks 61040b915d Revert "Fix testcase for attribute ordering."
This reverts commit 997c6516ca161073a1d516ebca7c0ca7722f64e2.

llvm-svn: 175248
2013-02-15 04:15:50 +00:00
Bill Wendling f7d8d767fb Fix testcase for attribute ordering.
llvm-svn: 175238
2013-02-15 01:04:46 +00:00
Reed Kotler f022147790 Fix minor mips16 issues in directives for function prologue. Probably this does
not matter but makes it more gcc compatible which avoids possible subtle
problems. Also, turned back on a disabled check in helloworld.ll. 

llvm-svn: 175237
2013-02-15 01:04:38 +00:00
Bill Wendling fa1d248ccf Fix testcase for attribute ordering.
llvm-svn: 175236
2013-02-15 00:58:25 +00:00
Bill Wendling 24b05cbeef Simplify the attributes '<' comparison function.
llvm-svn: 175235
2013-02-15 00:55:08 +00:00
Akira Hatanaka 30f05f3dc7 [mips] Disallow moving load/store instructions past volatile instructions.
Unfortunately, I wasn't able to create a test case that demonstrates the
problem I was trying to fix with this patch.

llvm-svn: 175226
2013-02-14 23:54:40 +00:00
Akira Hatanaka 06bd138dad [mips] Replace usage of SmallSet with BitVector, which is used to keep track of
defined and used registers. Also add a few helper functions to simplify the
code. 

llvm-svn: 175224
2013-02-14 23:40:57 +00:00
Akira Hatanaka 1083eb175c [mips] Fix comments and coding style violations. Declare functions to be const.
llvm-svn: 175222
2013-02-14 23:20:15 +00:00
Joel Jones 0f8617b17e The ARM NEON vector compare instructions take three arguments. However, the
assembler should also accept a two arg form, as the docuemntation specifies that
the first (destination) register is optional.

This patch uses TwoOperandAliasConstraint to add the two argument form.

It also fixes an 80-column formatting problem in:
  test/MC/ARM/neon-bitwise-encoding

<rdar://problem/12909419> Clang rejects ARM NEON assembly instructions

llvm-svn: 175221
2013-02-14 23:18:40 +00:00
Eli Bendersky a1c6635ca3 The operand listing is very much outdated.
llvm-svn: 175220
2013-02-14 23:17:03 +00:00
Akira Hatanaka dfd2f24d0c [mips] Simplify code in function Filler::findDelayInstr.
1. Define and use function terminateSearch.
2. Use MachineBasicBlock::iterator instead of MachineBasicBlock::instr_iterator.
3. Delete the line which checks whether an instruction is a pseudo. 

llvm-svn: 175219
2013-02-14 23:11:24 +00:00
Preston Gurd 9d0a1e2d8e Mark getRawBits const.
Patch by Tyler Nowicki.

llvm-svn: 175218
2013-02-14 22:49:29 +00:00
Hal Finkel e7a1ef422b BBVectorize: Remove the remaining instances of std::multimap
All instances of std::multimap have now been replaced by
DenseMap<K, std::vector<V> >, and this yields a speedup of 5% on the
csa.ll test case from PR15222.

No functionality change intended.

llvm-svn: 175216
2013-02-14 22:38:04 +00:00
Hal Finkel c3a4425c34 BBVectorize: Don't store candidate pairs in a std::multimap
This is another commit on the road to removing std::multimap from
BBVectorize. This gives an ~1% speedup on the csa.ll test case
in PR15222.

No functionality change intended.

llvm-svn: 175215
2013-02-14 22:37:09 +00:00
Jakub Staszak 701cc97e92 Simplify code. Remove "else after return".
llvm-svn: 175212
2013-02-14 21:50:09 +00:00
Chad Rosier 6f9c38545c Update comment.
llvm-svn: 175209
2013-02-14 20:44:07 +00:00