- Jan 24, 2014
-
-
Juergen Ributzka authored
Retry commit r200022 with a fix for the build bot errors. Constant expressions have (unlike instructions) module scope use lists and therefore may have users in different functions. The fix is to simply ignore these out-of-function uses. llvm-svn: 200034
-
Hal Finkel authored
DAGCombiner::GatherAllAliases, which is only used when AA used is enabled during DAGCombine, had a fundamentally incorrect assumption for which this change compensates. GatherAllAliases, which is used to find aliasing predecessor chain nodes (so that a better chain can be selected for a load or store to enable subsequent optimizations) assumed that walking up the chain would always catch all possibly-aliasing loads and stores. This is not true: To really find all aliases, we also need to search for aliases through the value operand of a store, etc. Consider the following situation: Token1 = ... L1 = load Token1, %52 S1 = store Token1, L1, %51 L2 = load Token1, %52+8 S2 = store Token1, L2, %51+8 Token2 = Token(S1, S2) L3 = load Token2, %53 S3 = store Token2, L3, %52 L4 = load Token2, %53+8 S4 = store Token2, L4, %52+8 If we search for aliases of S3 (which loads address %52), and we look only through the chain, then we'll miss the trivial dependence on L1 (which loads from %52). We then might change all loads and stores to use Token1 as their chain operand, which could result in copying %53 into %52 before copying %52 into %51 (which should happen first). The problem is, however, that searching for such data dependencies can become expensive, and the cost is not directly related to the chain depth. Instead, we'll rule out such configurations by insisting that we've visited all chain users (except for users of the original chain, which is not necessary). When doing this, we need to look through nodes we don't care about (otherwise, things like register copies will interfere with trivial use cases). Unfortunately, I don't have a small test case for this problem. Creating the underlying situation is not hard (a pair of memcpys will do it), but arranging for the default instruction schedule to be incorrect is very fragile. This unbreaks self hosting on PPC64 when using -mllvm -combiner-global-alias-analysis -mllvm -combiner-alias-analysis. llvm-svn: 200033
-
Bill Wendling authored
We don't want to lose attributes when a function decl without them is merged with a function decl that has them. PR2382 llvm-svn: 200030
-
Benjamin Kramer authored
PR18600. llvm-svn: 200028
-
Lang Hames authored
<rdar://problem/15611947> llvm-svn: 200027
-
Juergen Ributzka authored
This reverts commit r200022 to unbreak the build bots. llvm-svn: 200024
-
Hal Finkel authored
These transformations obviously won't work for indexed (pre/post-inc) loads and stores. In practice, I'm not sure there is any benefit to enabling them for indexed nodes because other transformations that these might enable likely also won't handle indexed nodes. I don't have an in-tree test case that hits this problem, but an upcoming bug fix will make it much more likely. llvm-svn: 200023
-
Juergen Ributzka authored
This pass identifies expensive constants to hoist and coalesces them to better prepare it for SelectionDAG-based code generation. This works around the limitations of the basic-block-at-a-time approach. First it scans all instructions for integer constants and calculates its cost. If the constant can be folded into the instruction (the cost is TCC_Free) or the cost is just a simple operation (TCC_BASIC), then we don't consider it expensive and leave it alone. This is the default behavior and the default implementation of getIntImmCost will always return TCC_Free. If the cost is more than TCC_BASIC, then the integer constant can't be folded into the instruction and it might be beneficial to hoist the constant. Similar constants are coalesced to reduce register pressure and materialization code. When a constant is hoisted, it is also hidden behind a bitcast to force it to be live-out of the basic block. Otherwise the constant would be just duplicated and each basic block would have its own copy in the SelectionDAG. The SelectionDAG recognizes such constants as opaque and doesn't perform certain transformations on them, which would create a new expensive constant. This optimization is only applied to integer constants in instructions and simple (this means not nested) constant cast experessions. For example: %0 = load i64* inttoptr (i64 big_constant to i64*) Reviewed by Eric llvm-svn: 200022
-
Juergen Ributzka authored
llvm-svn: 200021
-
Juergen Ributzka authored
llvm-svn: 200020
-
Alp Toker authored
Sweep the codebase for common typos. Includes some changes to visible function names that were misspelt. llvm-svn: 200018
-
Alp Toker authored
This enables IO error reports in both the child and server processes. The scheme still isn't entirely satisfactory and output is jumbled but it beats having no output at all. This will hopefully unblock ARM support (PR18057). llvm-svn: 200017
-
Benjamin Kramer authored
llvm-svn: 200016
-
Rafael Espindola authored
llvm-svn: 200014
-
Rafael Espindola authored
r200011 remove the special codepaths in MC for inline asm, so we can now test all the logic with just llc + llvm-mc. llvm-svn: 200013
-
Rafael Espindola authored
There is no inline asm in a .s file. Therefore, there should be no logic to handle it in the streamer. Inline asm only exists in bitcode files, so the logic can live in the (long misnamed) AsmPrinter class. llvm-svn: 200011
-
NAKAMURA Takumi authored
llvm-svn: 200000
-
NAKAMURA Takumi authored
llvm-svn: 199995
-
Eric Christopher authored
in order to fix the cygwin/mingw bots. This reverts commit r199990. llvm-svn: 199991
-
Eric Christopher authored
compile unit. Make these relocations on the platforms that need relocations and add a routine to ensure that we don't put the addresses in an offset table for split dwarf. llvm-svn: 199990
-
Kevin Qin authored
llvm-svn: 199978
-
Venkatraman Govindaraju authored
With this change, all supported tests in test/ExecutionEngine pass in sparcv9. llvm-svn: 199977
-
Juergen Ributzka authored
This commit teaches the X86 backend to create the same X86 instructions when it lowers an sadd/ssub with overflow intrinsic and a conditional branch that uses that overflow result. This allows SelectionDAG to recognize and remove one of the redundant operations. This fixes <rdar://problem/15874016> and <rdar://problem/15661073>. Reviewed by Nadav llvm-svn: 199976
-
Jakob Stoklund Olesen authored
These all use the compare-and-swap CASA/CASXA instructions. llvm-svn: 199975
-
Venkatraman Govindaraju authored
Add test cases to check parsing of v9 double registers and their aliased quad registers. llvm-svn: 199974
-
Rui Ueyama authored
llvm-svn: 199972
-
Rafael Espindola authored
llvm-svn: 199971
-
Rafael Espindola authored
llvm-svn: 199969
-
Rafael Espindola authored
llvm-svn: 199968
-
Rafael Espindola authored
llvm-svn: 199967
-
Chandler Carruth authored
We completely skipped promotion in LICM if the loop has a preheader or dedicated exits, but not *both*. We hoist if there is a preheader, and sink if there are dedicated exits, but either hoisting or sinking can move loop invariant code out of the loop! I have no idea if this has a practical consequence. If anyone has ideas for a test case, let me know. llvm-svn: 199966
-
Rafael Espindola authored
llvm-svn: 199965
-
Chandler Carruth authored
literal that bakes a pass name and forces parsing it in the pass manager. llvm-svn: 199963
-
Rafael Espindola authored
llvm-svn: 199955
-
- Jan 23, 2014
-
-
Eric Christopher authored
the existence of comdat/special sections. llvm-svn: 199954
-
Rafael Espindola authored
llvm-svn: 199951
-
Kevin Enderby authored
registers in memory addresses that do not match the index register. As it does for .att_syntax. rdar://15887380 llvm-svn: 199948
-
Alp Toker authored
The client and server now use a single unified low-level RPC core built around LLVM's existing cross-platform abstractions. llvm-svn: 199947
-
Kevin Enderby authored
scale factors in memory addresses. As it does for .att_syntax. It was producing: Assertion failed: (((Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8)) && "Invalid scale!"), function CreateMem, file /Volumes/SandBox/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp, line 1133. rdar://14967214 llvm-svn: 199942
-
Eric Christopher authored
code this looks correct, but could use review. The previous was definitely not correct. llvm-svn: 199940
-