Commit Graph

17438 Commits

Author SHA1 Message Date
David Blaikie
b1494f18ec And... fix the build some more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221036 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-01 01:15:24 +00:00
David Blaikie
a49cbece54 Just iterate the DwarfCompileUnits rather than trying to filter them out of the list of all units.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221034 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-01 01:11:19 +00:00
David Blaikie
bf29eb3ad1 Add '*' to auto variable that is a pointer, as per the coding conventions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221033 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-01 01:03:39 +00:00
David Blaikie
e542d91ee5 Add DwarfCompileUnit::getSkeleton that returns DwarfCompileUnit* to avoid having to cast from DwarfUnit* on every call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221031 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-01 00:50:34 +00:00
Duncan P. N. Exon Smith
3a84a6377c IR: MDNode => Value: Instruction::getMetadata()
Change `Instruction::getMetadata()` to return `Value` as part of
PR21433.

Update most callers to use `Instruction::getMDNode()`, which wraps the
result in a `cast_or_null<MDNode>`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221024 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-01 00:10:31 +00:00
David Blaikie
54a86b37dd Sink some of DwarfDebug::collectDeadVariables down into DwarfCompileUnit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221010 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-31 22:30:30 +00:00
David Blaikie
021153f536 Sink most of DwarfDebug::constructAbstractSubprogramScopeDIE into DwarfCompileUnit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221005 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-31 21:57:02 +00:00
Quentin Colombet
9b6ca9304c [CodeGenPrepare] Move extractelement close to store if they can be combined.
This patch adds an optimization in CodeGenPrepare to move an extractelement
right before a store when the target can combine them.
The optimization may promote any scalar operations to vector operations in the
way to make that possible.


** Context **

Some targets use different register files for both vector and scalar operations.
This means that transitioning from one domain to another may incur copy from one
register file to another. These copies are not coalescable and may be expensive.
For example, according to the scheduling model, on cortex-A8 a vector to GPR
move is 20 cycles.


** Motivating Example **

Let us consider an example:
define void @foo(<2 x i32>* %addr1, i32* %dest) {
 %in1 = load <2 x i32>* %addr1, align 8
 %extract = extractelement <2 x i32> %in1, i32 1
 %out = or i32 %extract, 1
 store i32 %out, i32* %dest, align 4
 ret void
}

As it is, this IR generates the following assembly on armv7:
  vldr  d16, [r0]            @vector load  
  vmov.32 r0, d16[1]  @ cross-register-file copy: 20 cycles
  orr r0, r0, #1           @ scalar bitwise or
  str r0, [r1]               @ scalar store
  bx  lr

Whereas we could generate much faster code:
  vldr  d16, [r0]               @ vector load
  vorr.i32  d16, #0x1     @ vector bitwise or
  vst1.32 {d16[1]}, [r1:32] @ vector extract + store
  bx  lr

Half of the computation made in the vector is useless, but this allows to get
rid of the expensive cross-register-file copy.


** Proposed Solution **

To avoid this cross-register-copy penalty, we promote the scalar operations to
vector operations. The penalty will be removed if we manage to promote the whole
chain of computation in the vector domain.
Currently, we do that only when the chain of computation ends by a store and the
target is able to combine an extract with a store.

Stores are the most likely candidates, because other instructions produce values
that would need to be promoted and so, extracted as some point[1]. Moreover,
this is customary that targets feature stores that perform a vector extract (see
AArch64 and X86 for instance).

The proposed implementation relies on the TargetTransformInfo to decide whether
or not it is beneficial to promote a chain of computation in the vector domain.
Unfortunately, this interface is rather inaccurate for this level of details and
although this optimization may be beneficial for X86 and AArch64, the inaccuracy
will lead to the optimization being too aggressive.
Basically in TargetTransformInfo, everything that is legal has a cost of 1,
whereas, even if a vector type is legal, usually a vector operation is slightly
more expensive than its scalar counterpart. That will lead to too many
promotions that may not be counter balanced by the saving of the
cross-register-file copy. For instance, on AArch64 this penalty is just 4
cycles.

For now, the optimization is just enabled for ARM prior than v8, since those
processors have a larger penalty on cross-register-file copies, and the scope is
limited to basic blocks. Because of these two factors, we limit the effects of
the inaccuracy. Indeed, I did not want to build up a fancy cost model with block
frequency and everything on top of that.

[1] We can imagine targets that can combine an extractelement with  other
instructions than just stores. If we want to go into that direction, the current
interfaces must be augmented and, moreover, I think this becomes a global isel
problem.

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

<rdar://problem/14170854>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220978 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-31 17:52:53 +00:00
David Blaikie
7d26b99189 Correct assert text from r220923
Noticed in post-commit review by Adrian Prantl.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220967 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-31 16:45:36 +00:00
Hao Liu
80021c5cf8 PR20557: Fix the bug that bogus cpu parameter crashes llc on AArch64 backend.
Initial patch by Oleg Ranevskyy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220945 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-31 02:35:34 +00:00
Ahmed Bougacha
107d77958d [SelectionDAG] When scalarizing trunc, don't assert for legal operands.
r212242 introduced a legalizer hook, originally to let AArch64 widen
v1i{32,16,8} rather than scalarize, because the legalizer expected, when
scalarizing the result of a conversion operation, to already have
scalarized the operands.  On AArch64, v1i64 is legal, so that commit
ensured operations such as v1i32 = trunc v1i64 wouldn't assert.

It did that by choosing to widen v1 types whenever possible.  However,
v1i1 types, for which there's no legal widened type, would still trigger
the assert.

This commit fixes that, by only scalarizing a trunc's result when the
operand has already been scalarized, and introducing an extract_elt
otherwise.  
This is similar to r205625.

Fixes PR20777.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220937 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-30 23:46:50 +00:00
Louis Gerbarg
4c77b29082 Fix incorrect invariant check in DAG Combine
Earlier this summer I fixed an issue where we were incorrectly combining
multiple loads that had different constraints such alignment, invariance,
temporality, etc. Apparently in one case I made copt paste error and swapped
alignment and invariance.

Tests included.

rdar://18816719

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220933 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-30 22:21:03 +00:00
David Blaikie
5f5c65058b PR21408: Workaround the appearance of duplicate variables due to problems when inlining two calls to the same function from the same call site.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220923 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-30 20:20:11 +00:00
NAKAMURA Takumi
7710e2553b Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220857 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-29 15:23:11 +00:00
David Blaikie
f9219079ac Minimize the scope of some variables, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220759 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-28 02:57:26 +00:00
Lang Hames
57902cc070 [PBQP] Unique allowed-sets for nodes in the PBQP graph and use pairs of these
sets as keys into a cache of interference matrice values in the Interference
constraint adder.

Creating interference matrices was one of the large remaining time-sinks in
PBQP. Caching them reduces the total compile time (when using PBQP) on the
nightly test suite by ~10%.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220688 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27 17:44:25 +00:00
David Blaikie
bcc5753df8 Remove some unnecessary casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220658 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-26 23:37:04 +00:00
Frederic Riss
ab08da75d7 Sink DwarfUnit::constructImportedEntityDIE into DwarfCompileUnit.
So that it has access to getOrCreateGlobalVariableDIE. If we ever support
decsribing using directive in C++ classes (thus requiring support in type
units), it will certainly use another mechanism anyway.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220594 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-24 21:31:09 +00:00
Matt Arsenault
a36665918f Fix copy paste comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220581 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-24 18:13:10 +00:00
David Blaikie
7f6ba1758b DebugInfo: Sink DwarfDebug::ScopeVariables down into DwarfFile
(part of refactoring to allow subprogram emission in both the skeleton
and main units to enable -gmlt-like data to be included in the skeleton
for live inlined backtracing purposes)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220578 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-24 17:57:34 +00:00
David Blaikie
3ad7d41947 Remove DwarfDebug::FirstCU as it has no use
It was only being used as a flag to identify the lack of debug info from
within endModule - use the section labels for that instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220575 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-24 17:53:38 +00:00
Sanjay Patel
a46f06efe2 Use rsqrt (X86) to speed up reciprocal square root calcs
This is a first step for generating SSE rsqrt instructions for
reciprocal square root calcs when fast-math is allowed.

For now, be conservative and only enable this for AMD btver2
where performance improves significantly - for example, 29%
on llvm/projects/test-suite/SingleSource/Benchmarks/BenchmarkGame/n-body.c
(if we convert the data type to single-precision float).

This patch adds a two constant version of the Newton-Raphson
refinement algorithm to DAGCombiner that can be selected by any target
via a parameter returned by getRsqrtEstimate()..

See PR20900 for more details:
http://llvm.org/bugs/show_bug.cgi?id=20900

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220570 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-24 17:02:16 +00:00
Marcello Maggioni
77348a5703 Added reset of LexicalScope in LiveDebugVariables reset function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220545 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-24 02:46:50 +00:00
Timur Iskhodzhanov
92e132a36f Fix PR21189 -- Emit symbol subsection required to debug LLVM-built binaries with VS2012+
Reviewed at http://reviews.llvm.org/D5772

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220544 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-24 01:27:45 +00:00
David Blaikie
8a5eafb58d DebugInfo: Remove DwarfDebug::addScopeVariable now that it's just a trivial wrapper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220542 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-24 00:43:47 +00:00
Ahmed Bougacha
17c1e34c12 [SelectionDAG] Teach the vector scalarizer about FP conversions.
This adds support for legalization of instructions of the form:

  [fp_conv] <1 x i1> %op to <1 x double>

where fp_conv is one of fpto[us]i, [us]itofp.  This used to assert
because they were simply missing from the vector operand scalarizer.

A similar problem arose in r190830, with trunc instead.

Fixes PR20778.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220533 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 22:49:25 +00:00
Ahmed Bougacha
54d95a7074 Update comment and fix typos in assert message. (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220531 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 22:40:34 +00:00
Tim Northover
c0ecebb32b ScheduleDAG: record PhysReg dependencies represented by CopyFromReg nodes
x86's CMPXCHG -> EFLAGS consumer wasn't being recorded as a real EFLAGS
dependency because it was represented by a pair of CopyFromReg(EFLAGS) ->
CopyToReg(EFLAGS) nodes. ScheduleDAG was expecting the source to be an
implicit-def on the instruction, where the result numbers in the DAG and the
Uses list in TableGen matched up precisely.

The Copy notation seems much more robust, so this patch extends ScheduleDAG
rather than refactoring x86.

Should fix PR20376.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220529 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 22:31:48 +00:00
David Blaikie
991327143f DebugInfo: Remove DwarfDebug::CurrentFnArguments since we have to handle argument ordering of other arguments (abstract arguments) in the same way and already have code for that too.
While refactoring this code I was confused by both the name I had
introduced (addNonArgumentVariable... but it has all this logic to
handle argument numbering and keep things in order?) and by the
redundancy. Seems when I fixed the misordered inlined argument handling,
I didn't realize it was mostly redundant with the argument ordering code
(which I may've also written, I'm not sure). So let's just rely on the
more general case.

The only oddity in output this produces is that it means when we emit
all the variables for the current function, we don't track when we've
finished the argument variables and are about to start the local
variables and insert DW_AT_unspecified_parameters (for varargs
functions) there. Instead it ends up after the local variables, scopes,
etc. But this isn't invalid and doesn't cause DWARF consumers problems
that I know of... so we'll just go with that because it makes the code
nice & simple.

(though, let's see what the buildbots have to say about this - *crosses
fingers*)

There will be some cleanup commits to follow to remove the now trivial
wrappers, etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220527 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 22:27:50 +00:00
David Blaikie
48ba51a8cd DebugInfo: Sink DwarfDebug::addNonArgumentScopeVariable into DwarfFile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220520 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 22:04:30 +00:00
David Blaikie
78f043e90a DebugInfo: Remove DwarfDebug::addCurrentFnArgument declaration now that it's moved to DwarfFile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220515 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 21:53:17 +00:00
David Blaikie
129ab6c6c5 DebugInfo: Simplify/tidy/correct global variable decl/def emission handling.
This fixes a bug (introduced by fixing the IR emitted from Clang where
the definition of a static member would be scoped within the class,
rather than within its lexical decl context) where the definition of a
static variable would be placed inside a class.

It also improves source fidelity by scoping static class member
definitions inside the lexical decl context in which tehy are written
(eg: namespace n { class foo { static int i; } int foo::i; } - the
definition of 'i' will be within the namespace 'n' in the DWARF output
now).

Lastly, and the original goal, this reduces debug info size slightly
(and makes debug info easier to read, etc) by placing the definitions of
non-member global variables within their namespace, rather than using a
separate namespace-scoped declaration along with a definition at global
scope.

Based on patches and discussion with Frédéric.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220497 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 19:12:43 +00:00
David Blaikie
3d71678283 Remove explicit (void) use of DwarfFile::DD that was accidentally left in r220452.
Caught in post-commit review by Frédéric.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220487 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 16:12:58 +00:00
David Blaikie
87e9d8c051 [DebugInfo] Sink DwarfDebug::addCurrentFnArgument down into DwarfFile.
Variable handling will be sunk into DwarfFile so that abstract variables
and the like can be shared across multiple CUs (to handle cross-CU
inlining, for example).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220453 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 00:16:05 +00:00
David Blaikie
22a01da9de [DebugInfo] Add DwarfDebug& to DwarfFile.
Use the DwarfDebug in one function that previously took it as a
parameter, and lay the foundation for use this for other operations
coming soon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220452 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 00:16:03 +00:00
David Blaikie
ee129ed18d [DebugInfo] Remove LexicalScopes::isCurrentFunctionScope and CSE a use of LexicalScopes::getCurrentFunctionScope
Now that we're sure the only root (non-abstract) scope is the current
function scope, there's no need for isCurrentFunctionScope, the property
can be tested directly instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220451 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 00:06:27 +00:00
Benjamin Kramer
9552fcab70 Strength reduce constant-sized vectors into arrays. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220412 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 19:55:26 +00:00
Matt Arsenault
1b2e041962 Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220353 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 00:28:59 +00:00
Matt Arsenault
015776f38c Add minnum / maxnum codegen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220342 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-21 23:01:01 +00:00
Arnaud A. de Grandmaison
2d20cb2892 Pacify bots and simplify r220321
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220335 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-21 21:50:49 +00:00
Arnaud A. de Grandmaison
de246de958 [PBQP] Teach PassConfig to tell if the default register allocator is used.
This enables targets to adapt their pass pipeline to the register
allocator in use. For example, with the AArch64 backend, using PBQP
with the cortex-a57, the FPLoadBalancing pass is no longer necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220321 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-21 20:47:22 +00:00
Arnaud A. de Grandmaison
a5d0ebdbc2 [PBQP] Fix coalescing benefits
As coalescing registers is a benefit, the cost should be improved (i.e. made smaller) when coalescing is possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220302 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-21 16:24:15 +00:00
Rafael Espindola
45968c54e9 Fix a bit of confusion about .set and produce more readable assembly.
Every target we support has support for assembly that looks like

a = b - c
.long a

What is special about MachO is that the above combination suppresses the
production of a relocation.

With this change we avoid producing the intermediary labels when they don't
add any value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220256 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-21 01:17:30 +00:00
Rafael Espindola
33966cf988 Make AsmPrinter::EmitLabelOffsetDifference a static helper and simplify.
It had exactly one caller in a position where we know hasSetDirective is true.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220250 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-21 00:25:49 +00:00
Philip Reames
9be9473394 Introduce enum values for previously defined metadata types. (NFC)
Our metadata scheme lazily assigns IDs to string metadata, but we have a mechanism to preassign them as well.  Using a preassigned ID is helpful since we get compile time type checking, and avoid some (minimal) string construction and comparison.  This change adds enum value for three existing metadata types:
+    MD_nontemporal = 9, // "nontemporal"
+    MD_mem_parallel_loop_access = 10, // "llvm.mem.parallel_loop_access"
+    MD_nonnull = 11 // "nonnull"

I went through an updated various uses as well.  I made no attempt to get all uses; I focused on the ones which were easily grepable and easily to translate.  For example, there were several items in LoopInfo.cpp I chose not to update.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220248 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-21 00:13:20 +00:00
Lang Hames
33ea6f23fc [PBQP] Replace the interference-constraints algorithm with a faster version
loosely based on linear scan.

On x86-64 this is good for a ~2% drop in compile time on the nightly test suite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220143 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-18 17:26:07 +00:00
Pete Cooper
185a992dcf Check for dynamic alloca's when selecting lifetime intrinsics.
TL;DR: Indexing maps with [] creates missing entries.

The long version:

When selecting lifetime intrinsics, we index the *static* alloca map with the AllocaInst we find for that lifetime.  Trouble is, we don't first check to see if this is a dynamic alloca.

On the attached example, this causes a dynamic alloca to create an entry in the static map, and returns 0 (the default) as the frame index for that lifetime.  0 was used for the frame index of the stack protector, which given that it now has a lifetime, is coloured, and merged with other stack slots.

PEI would later trigger an assert because it expects the stack protector to not be dead.

This fix ensures that we only get frame indices for static allocas, ie, those in the map.  Dynamic ones are effectively dropped, which is suboptimal, but at least isn't completely broken.

rdar://problem/18672951

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220099 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-17 22:59:33 +00:00
Juergen Ributzka
32ef68718d [Stackmaps] Enable invoking the patchpoint intrinsic.
Patch by Kevin Modzelewski
Reviewers: atrick, ributzka
Reviewed By: ributzka
Subscribers: llvm-commits, reames

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220055 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-17 17:39:00 +00:00
Jan Vesely
cef793e8c7 SelectionDAG: Add sext_inreg optimizations
v2: use dyn_cast
    fixup comments
v3: use cast

Reviewed-by: Matt Arsenault <arsenm2@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220044 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-17 14:45:25 +00:00
Juergen Ributzka
933d703d7c Reduce code duplication between patchpoint and non-patchpoint lowering. NFC.
This is in preparation for another patch that makes patchpoints invokable.

Reviewers: atrick, ributzka
Reviewed By: ributzka
Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219967 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-16 21:26:35 +00:00