| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 166456
|
|
|
|
| |
llvm-svn: 166454
|
|
|
|
|
|
|
|
|
| |
deterministic, replace it with a DenseMap<std::pair<unsigned, unsigned>,
PHINode*> (we already have a map from BasicBlock to unsigned).
<rdar://problem/12541389>
llvm-svn: 166435
|
|
|
|
| |
llvm-svn: 166340
|
|
|
|
| |
llvm-svn: 166278
|
|
|
|
|
|
| |
interface.
llvm-svn: 166264
|
|
|
|
| |
llvm-svn: 166199
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch migrates the strcpy optimizations from the simplify-libcalls pass
into the instcombine library call simplifier. Note also that StrCpyChkOpt
has been updated with a few simplifications that were being done in the
simplify-libcalls version of StrCpyOpt, but not in the migrated implementation
of StrCpyOpt. There is no reason to overload StrCpyOpt with fortified and
regular simplifications in the new model since there is already a dedicated
simplifier for __strcpy_chk.
llvm-svn: 166198
|
|
|
|
|
|
|
|
|
|
|
| |
The TargetTransform changes are breaking LTO bootstraps of clang. I am
working with Nadav to figure out the problem, but I am reverting it for now
to get our buildbots working.
This reverts svn commits: 165665 165669 165670 165786 165787 165997
and I have also reverted clang svn 165741
llvm-svn: 166168
|
|
|
|
|
|
| |
different pointer sizes on a per address space basis.
llvm-svn: 165941
|
|
|
|
|
|
| |
This gets rid of some magic numbers.
llvm-svn: 165924
|
|
|
|
|
|
|
|
|
|
| |
Convert the internal representation of the Attributes class into a pointer to an
opaque object that's uniqued by and stored in the LLVMContext object. The
Attributes class then becomes a thin wrapper around this opaque
object. Eventually, the internal representation will be expanded to include
attributes that represent code generation options, etc.
llvm-svn: 165917
|
|
|
|
|
|
|
| |
This patch migrates the strcmp and strncmp optimizations from the
simplify-libcalls pass into the instcombine library call simplifier.
llvm-svn: 165915
|
|
|
|
| |
llvm-svn: 165904
|
|
|
|
|
|
| |
it with the equivalent from the builder class.
llvm-svn: 165895
|
|
|
|
| |
llvm-svn: 165881
|
|
|
|
|
|
|
| |
This patch migrates the strchr and strrchr optimizations from the
simplify-libcalls pass into the instcombine library call simplifier.
llvm-svn: 165875
|
|
|
|
|
|
|
| |
This patch migrates the strcat and strncat optimizations from the
simplify-libcalls pass into the instcombine library call simplifier.
llvm-svn: 165874
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements the new LibCallSimplifier class as outlined in [1].
In addition to providing the new base library simplification infrastructure,
all the fortified library call simplifications were moved over to the new
infrastructure. The rest of the library simplification optimizations will
be moved over with follow up patches.
NOTE: The original fortified library call simplifier located in the
SimplifyFortifiedLibCalls class was not removed because it is still
used by CodeGenPrepare. This class will eventually go away too.
[1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-August/052283.html
llvm-svn: 165873
|
|
|
|
|
|
|
| |
When all cases of a switch statement are dead, the weights vector only has one
element, and we will get an ssertion failure when calling createBranchWeights.
llvm-svn: 165759
|
|
|
|
| |
llvm-svn: 165747
|
|
|
|
|
|
| |
per address space pointer sizes to be optimized correctly.
llvm-svn: 165726
|
|
|
|
|
|
| |
information.
llvm-svn: 165665
|
|
|
|
|
|
| |
enums. These are then created via the correct Attributes creation method.
llvm-svn: 165607
|
|
|
|
|
|
| |
attribute object and add it appropriately. No functionality change.
llvm-svn: 165595
|
|
|
|
| |
llvm-svn: 165402
|
|
|
|
|
|
|
|
| |
a pointer to a type, in order to remove the uses of getGlobalContext().
Patch by Tyler Nowicki.
llvm-svn: 165255
|
|
|
|
|
|
|
|
|
|
| |
dereference" optimization to also handle instructions with multiple uses.
We conservatively only check the first use to avoid walking long use chains.
This catches the common case of having both a load and a store to a pointer
supplied by a PHI node.
llvm-svn: 165232
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instruction (for Intel Atom) was not being done by Clang, because
the type context used by Clang is not the default context.
It fixes the problem by getting the global context types for each div/rem
instruction in order to compare them against the types in the BypassTypeMap.
Tests for this will be done as a separate patch to Clang.
Patch by Tyler Nowicki.
llvm-svn: 165126
|
|
|
|
|
|
|
|
| |
value.
Fixes PR13985.
llvm-svn: 164934
|
|
|
|
|
|
|
|
| |
(switches), avoid it if possible.
No functionality change.
llvm-svn: 164923
|
|
|
|
|
|
|
|
| |
If the width is very large it gets truncated from uint64_t to uint32_t when
passed to TD->fitsInLegalInteger. The truncated value can fit in a register.
This manifested in massive memory usage or crashes (PR13946).
llvm-svn: 164784
|
|
|
|
|
|
| |
See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767
llvm-svn: 164768
|
|
|
|
| |
llvm-svn: 164767
|
|
|
|
|
|
|
|
| |
- Put statistics in alphabetical order
- Don't use getZextValue when building TableInt, just use APInts
- Introduce Create{Z,S}ExtOrTrunc in IRBuilder.
llvm-svn: 164696
|
|
|
|
|
|
|
| |
- Finish assert messages with exclamation mark
- Move overflow checking into ShouldBuildLookupTable.
llvm-svn: 164692
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tables in bitmaps when they fit in a target-legal register.
This saves some space, and it also allows for building tables that would
otherwise be deemed too sparse.
One interesting case that this hits is example 7 from
http://blog.regehr.org/archives/320. We currently generate good code
for this when lowering the switch to the selection DAG: we build a
bitmask to decide whether to jump to one block or the other. My patch
will result in the same bitmask, but it removes the need for the jump,
as the return value can just be retrieved from the mask.
llvm-svn: 164684
|
|
|
|
|
|
| |
breaking out the building of lookup tables into a separate class.
llvm-svn: 164682
|
|
|
|
|
|
| |
the rest of the tree.
llvm-svn: 164666
|
|
|
|
|
|
|
|
| |
and u/srem.
Fixed issue with Release build.
llvm-svn: 164654
|
|
|
|
| |
llvm-svn: 164627
|
|
|
|
|
|
| |
and u/srem.
llvm-svn: 164614
|
|
|
|
|
|
|
|
|
|
|
|
| |
We already have HoistThenElseCodeToIf, this patch implements
SinkThenElseCodeToEnd. When END block has only two predecessors and each
predecessor terminates with unconditional branches, we compare instructions in
IF and ELSE blocks backwards and check whether we can sink the common
instructions down.
rdar://12191395
llvm-svn: 164325
|
|
|
|
| |
llvm-svn: 164238
|
|
|
|
| |
llvm-svn: 164235
|
|
|
|
| |
llvm-svn: 164232
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
two variables where the first variable is returned and the second
ignored.
I don't think this occurs in practice (other passes should have cleaned
up the unused phi node), but it should still be handled correctly.
Also make the logic for determining if we should return early less
sketchy.
llvm-svn: 164225
|
|
|
|
|
|
| |
without parens.
llvm-svn: 164216
|
|
|
|
|
|
| |
Implementation derived from compiler-rt's implementation of signed and unsigned integer division.
llvm-svn: 164173
|
|
|
|
|
|
| |
and a conditional branch; also when removing dead cases from a switch.
llvm-svn: 164084
|