aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-05-31[PowerPC] Eliminate integer compare instructions - vol. 3linaro-local/renato/aalinaro-local/aaNemanja Ivanovic
This patch builds upon https://reviews.llvm.org/rL302810 to add handling for the 64-bit SETEQ patterns. Differential Revision: https://reviews.llvm.org/D33369 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304286 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31[AVR] Fix a big in shift operator lowering; Authored by Dr. Gergo ErdiDylan McKay
When generating code for a shift loop, check the shift amount against the literal value 0, not R0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304284 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31[AVR] CPIRdK can only work with r16..r31; Authored by Dr. Gergo ErdiDylan McKay
(https://github.com/avr-rust/rust/issues/50) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304283 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31[PowerPC] Eliminate integer compare instructions - vol. 2Nemanja Ivanovic
This patch builds upon https://reviews.llvm.org/rL302810 to add handling for bitwise logical operations in general purpose registers. The idea is to keep the values in GPRs as long as possible - only extracting them to a condition register bit when no further operations are to be done. Differential Revision: https://reviews.llvm.org/D31851 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304282 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31[TableGen] Implement non-const versions of Record::getValue by delegating to ↵Craig Topper
the const versions to avoid duplicate code. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304281 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31[TableGen] Make one of RecordVal's constructors delegate to the other to ↵Craig Topper
reduce duplicate code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304280 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31[ObjectYAML] Split CodeViewYAML into 3 pieces.Zachary Turner
The code was a mess and disorganized due to the sheer amount of it being in one file. So I'm splitting this into three files. One for CodeView types, one for CodeView symbols, and one for CodeView debug subsections. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304278 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31[coroutines] Call initializePass in coroutine pass constructorsGor Nishanov
Summary: Fixes: https://bugs.llvm.org/show_bug.cgi?id=33226 Reviewers: chandlerc, davide, majnemer, dblaikie Reviewed By: chandlerc Subscribers: EricWF, llvm-commits Differential Revision: https://reviews.llvm.org/D33701 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304277 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31[CFLAA] Add missing break; note things are broken.George Burgess IV
Thanks to Galina Kistanova for finding the missing break! When trying to make a test for this, I realized our logic for handling extractvalue/insertvalue/... is somewhat broken. This makes constructing a test-case for this missing break nontrivial. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304275 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31X86FrameLowering: No need to mark FP as live-in everywhereMatthias Braun
The frame pointer (when used as frame pointer) is a reserved register. We do not track liveness of reserved registers and hence do not need to add them to the basic block livein lists. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304274 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304273 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31NewGVN: Fix PR 33185 by checking whether we need to recursivelyDaniel Berlin
generate a phi of ops, which we don't currently support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304272 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31Fix test that wasn't update_test_check'dDaniel Berlin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304271 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31InstructionSimplify: Remove now-redundant reachability tests, as dominates() ↵Daniel Berlin
already does them git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304270 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31Mark a test as requiring a default tripleVedant Kumar
This test assumes that llc can infer a default triple. I'm not sure why exactly, but the Verify MachineInstrs bot requires tests to be explicit about this dependency. This commit follows the lead from r248452 and adds in 'REQUIRES: default_triple' to omit-empty.ll. Bot URL: http://lab.llvm.org:8080/green/job/Verify-Machineinstrs_AArch64/7500 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304269 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304268 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31ARM: Fix cmpxchg O0 expansionMatthias Braun
This is the equivalent of r304048 for ARM: - Rewrite livein calculation to use the computeLiveIns() helper function. This is slightly less efficient but easier to reason about and doesn't unnecessarily add pristine and reserved registers[1] - Zero the status register at the beginning of the loop to make sure it has a defined value. - Remove kill flags of values that need to stay alive throughout the loop. [1] An upcoming commit of mine will tighten the MachineVerifier to catch these. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304267 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31ARM: Do not add reserved registers to block livein lists; NFCMatthias Braun
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304266 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31[CodeGen] Fix some Clang-tidy modernize-use-using and Include What You Use ↵Eugene Zelenko
warnings; other minor fixes (NFC). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304265 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31Fix CodeView-related modules build failures post-r304248Vedant Kumar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304264 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31[ObjectYAML] Clean up the CodeView headers a bit.Zachary Turner
CodeViewYAML.h attempts to hide the details of many of the CodeView yaml structures and types, but at the same time it exposes the mapping traits for them to external users of the header. This patch just hides these in the implementation files so that the interface is kept as simple as possible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304263 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31Fix misspellingAlina Sbirlea
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304262 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31Add latency info for Exynos interleaved Load/Store instructions.Abderrazek Zaafrani
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304259 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30Try to fix build again.Zachary Turner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304257 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30[CodeView] Move CodeView symbol yaml logic to ObjectYAML.Zachary Turner
This continues the effort to get the CodeView YAML parsing logic into ObjectYAML. After this patch, the only missing piece will be the CodeView debug symbol subsections. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304256 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30Fix bug on Big-Endian system, due to reference to vector out of scope.Eric Beckmann
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304255 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30MachineInstr: Do not skip dead def operands when printing.Matthias Braun
This was introduced a long time ago in r86583 when regmask operands didn't exist. Nowadays the behavior hurts more than it helps. This removes it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304254 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30This patch should fix various clang warnings and a use of to_stringEric Beckmann
which isn't support before c++11. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304252 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30[AntiDepBreaker] Revert r299124 and add a test.Tim Shen
Summary: AntiDepBreaker intends to add all live-outs, including the implicit CSRs, in StartBlock. r299124 was done without understanding that intention. Now with the live-ins propagated correctly (D32464), we can revert this change. Reviewers: MatzeB, qcolombet Subscribers: nemanjai, llvm-commits Differential Revision: https://reviews.llvm.org/D33697 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304251 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30MIR: update test for noVRegs removal.Tim Northover
I think I hadn't git pulled recently enough to bring it in. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304250 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30Try to fix build.Zachary Turner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304249 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30[CodeView] Move CodeView YAML code to ObjectYAML.Zachary Turner
This is the beginning of an effort to move the codeview yaml reader / writer into ObjectYAML so that it can be shared. Currently the only consumer / producer of CodeView YAML is llvm-pdbdump, but CodeView can exist outside of PDB files, and indeed is put into object files and passed to the linker to produce PDB files. Furthermore, there are subtle differences in the types of records that show up in object file CodeView vs PDB file CodeView, but they are otherwise 99% the same. By having this code in ObjectYAML, we can have llvm-pdbdump reuse this code, while teaching obj2yaml and yaml2obj to use this syntax for dealing with object files that can contain CodeView. This patch only adds support for CodeView type information to ObjectYAML. Subsequent patches will add support for CodeView symbol information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304248 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30TargetPassConfig: Keep a reference to an LLVMTargetMachine; NFCMatthias Braun
TargetPassConfig is not useful for targets that do not use the CodeGen library, so we may just as well store a pointer to an LLVMTargetMachine instead of just to a TargetMachine. While at it, also change the constructor to take a reference instead of a pointer as the TM must not be nullptr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304247 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30MIR: remove explicit "noVRegs" property.Tim Northover
We can infer this from the incoming MIR, so there's no reason to represent it with a special flag. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304246 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30[PartialInlining] Shrinkwrap allocas with live range contained in outline ↵Xinliang David Li
region. Differential Revision: http://reviews.llvm.org/D33618 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304245 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30[Localizer] Don't trick to be smart for the insertion pointQuentin Colombet
There is no guarantee that the first use of a constant that is traversed is actually the first in the related basic block. Thus, if we use that as the insertion point we may end up with definitions that don't dominate there use. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304244 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30[llvm-config] Fix cflags test looking for "warning"Ben Langmuir
This will fail if you configure with e.g. -Wno-unknown-warning-option. Change it to check for 'warning:' just like we did for 'error:' in r289484. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304239 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30[LV] Reapply r303763 with fix for PR33193Matthew Simpson
r303763 caused build failures in some out-of-tree tests due to an assertion in TTI. The original patch updated cost estimates for induction variable update instructions marked for scalarization. However, it didn't consider that the incoming value of an induction variable phi node could be a cast instruction. This caused queries for cast instruction costs with a mix of vector and scalar types. This patch includes a fix for cast instructions and the test case from PR33193. The fix was suggested by Jonas Paulsson <paulsson@linux.vnet.ibm.com>. Reference: https://bugs.llvm.org/show_bug.cgi?id=33193 Original Differential Revision: https://reviews.llvm.org/D33457 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304235 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30[Object] Remove unused field + constructor.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304233 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30[Object] Fix pessimizing move.Benjamin Kramer
Returning the Error by value triggers copy elision, the move is more expensive. Clang rightfully warns about it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304232 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30Revert "This patch closes PR28513: an optimization of multiplication by ↵Vedant Kumar
different constants. It's implemented on DAG combiner level." This reverts commit r304209. I think this change is responsible for a tablgen failure in stage2 builds: http://green.lab.llvm.org/green/job/clang-stage2-configure-Rthinlto_build/2171/ I reproduced the failure locally (without ThinLTO), reverted the commit, rebuilt the stage1 clang, rebuilt the stage2 llvm-tblgen tool, and found that the crash disappears when the commit is reverted. Here is the stack trace: FAILED: lib/Target/ARM/ARMGenRegisterBank.inc.tmp cd /Volumes/Builds/pz-master-stage2-RA/lib/Target/ARM && /Volumes/Builds/pz-master-stage2-RA/bin/llvm-tblgen -gen-register-bank -I /Users/vk/llvm/lib/Target/ARM -I /Users/vk/llvm/include -I /Users/vk/llvm/lib/Target /Users/vk/llvm/lib/Target/ARM/ARM.td -o /Volumes /Builds/pz-master-stage2-RA/lib/Target/ARM/ARMGenRegisterBank.inc.tmp 0 llvm-tblgen 0x0000000106fc9568 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40 1 llvm-tblgen 0x0000000106fc9be6 SignalHandler(int) + 422 2 libsystem_platform.dylib 0x00000001076a7fba _sigtramp + 26 3 libsystem_platform.dylib 0x00007fff58deb468 _sigtramp + 1366570184 4 llvm-tblgen 0x0000000106e89cc7 llvm::CodeGenRegBank::getCompositeSubRegIndex(llvm::CodeGenSubRegIndex*, llvm::CodeGenSubRegIndex*) + 615 5 llvm-tblgen 0x0000000106e88be6 llvm::CodeGenRegister::computeSubRegs(llvm::CodeGenRegBank&) + 2182 6 llvm-tblgen 0x0000000106e8e9f0 llvm::CodeGenRegBank::CodeGenRegBank(llvm::RecordKeeper&) + 2192 7 llvm-tblgen 0x0000000106f384a1 llvm::EmitRegisterBank(llvm::RecordKeeper&, llvm::raw_ostream&) + 65 8 llvm-tblgen 0x0000000106f72c64 (anonymous namespace)::LLVMTableGenMain(llvm::raw_ostream&, llvm::RecordKeeper&) + 1172 9 llvm-tblgen 0x0000000106fcb15f llvm::TableGenMain(char*, bool (*)(llvm::raw_ostream&, llvm::RecordKeeper&)) + 3599 10 llvm-tblgen 0x0000000106f727a6 main + 134 11 libdyld.dylib 0x000000010733c6a5 start + 1 Stack dump: 0. Program arguments: /Volumes/Builds/pz-master-stage2-RA/bin/llvm-tblgen -gen-register-bank -I /Users/vk/llvm/lib/Target/ARM -I /Users/vk/llvm/include -I /Users/vk/llvm/lib/Target /Users/vk/llvm/lib/Target/ARM/ARM.td -o /Volumes/Builds/pz-master-stage2-RA/lib/Target/ARM/ARMGenRegisterBank.inc.tmp /bin/sh: line 1: 41986 Segmentation fault: 11 /Volumes/Builds/pz-master-stage2-RA/bin/llvm-tblgen -gen-register-bank -I /Users/vk/llvm/lib/Target/ARM -I /Users/vk/llvm/include -I /Users/vk/llvm/lib/Target /Users/vk/llvm/lib/Target/ARM/ARM.td -o /Volumes/Builds/pz -master-stage2-RA/lib/Target/ARM/ARMGenRegisterBank.inc.tmp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304231 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30Added missing break.Galina Kistanova
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304230 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30Revert "[Cloning] Take another pass at properly cloning debug info"Keno Fischer
At least one build bot is complaining. Will investigate after lunch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304228 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30ARM: Add missing flags to TBB_[JH]T pseudo instructionsMatthias Braun
NFC except for calming down the machine verifier in some cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304227 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30[Cloning] Take another pass at properly cloning debug infoKeno Fischer
Summary: In rL302576, DISubprograms gained the constraint that a !dbg attachments to functions must have a 1:1 mapping to DISubprograms. As part of that change, the function cloning support was adjusted to attempt to enforce this invariant during cloning. However, there were several problems with the implementation. Part of these were fixed in rL304079. However, there was a more fundamental problem with these changes, namely that it bypasses the matadata value map, causing the cloned metadata to be a mix of metadata pointing to the new suprogram (where manual code was added to fix those up) and the old suprogram (where this was not the case). This mismatch could cause a number of different assertion failures in the DWARF emitter. Some of these are given at https://github.com/JuliaLang/julia/issues/22069, but some others have been observed as well. Attempt to rectify this by partially reverting the manual DI metadata fixup, and instead using the standard value map approach. To retain the desired semantics of not duplicating the compilation unit and inlined subprograms, explicitly freeze these in the value map. Reviewers: dblaikie, aprantl, GorNishanov, echristo Reviewed By: aprantl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33655 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304226 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30Adding parsing ability for .res file.Eric Beckmann
Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33566 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304225 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30[InstCombine] Add test cases to show missed opportunities to remove compare ↵Craig Topper
instructions after cttz/ctlz/ctpop where some bits of the input is known. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304224 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30[Hexagon] Improve code generation for 32x32-bit multiplicationKrzysztof Parzyszek
For multiplications of 64-bit values (giving 64-bit result), detect cases where the arguments are sign-extended 32-bit values, on a per- operand basis. This will allow few patterns to match a wider variety of combinations in which extensions can occur. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304223 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30[CodeView] Add more DebugSubsection implementations.Zachary Turner
This adds implementations for Symbols and FrameData, and renames the existing codeview::StringTable class to conform to the DebugSectionStringTable convention. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304222 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30[SelectionDAG] Remove special case for ISD::FPOWI from the strict FP ↵Craig Topper
intrinsic handling. This code was compensating for FPOWI defaulting to Legal and many targets not changing it to Expand. This was fixed in r304215 to default to Expand so this special handling should no longer be necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304221 91177308-0d34-0410-b5e6-96231b3b80d8