summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [AVR] Fix codegen for rotate instructionsJim Lin2019-12-234-6/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch introduces the ROLBRd and RORBRd pseudo-instructions, which implemenent the "traditional" rotate operations; instead of the AVR rotate instructions that use the carry bit. The code is not optimized at all. Especially when dealing with loops of rotate instructions, this codegen should be improved some day. Related bug: 41358 <https://bugs.llvm.org/show_bug.cgi?id=41358> //Note//: This is my first submitted patch. Reviewers: dylanmckay, Jim Reviewed By: dylanmckay Subscribers: hiraditya, llvm-commits, dylanmckay, dsprenkels Tags: #llvm Patched by dsprenkels (Daan Sprenkels) Differential Revision: https://reviews.llvm.org/D60365
* [PowerPC] Exploit `vrl(b|h|w|d)` to perform vector rotationKai Luo2019-12-234-20/+162
| | | | | | | | | Summary: Currently, we set legalization action of `ISD::ROTL` vectors as `Expand` in `PPCISelLowering`. However, we can exploit `vrl(b|h|w|d)` to lower `ISD::ROTL` directly. Differential Revision: https://reviews.llvm.org/D71324
* [AST] Add missing MultiplexConsumer::CompleteExternalDeclarationReid Kleckner2019-12-222-0/+6
|
* reland "[DebugInfo] Support to emit debugInfo for extern variables"Yonghong Song2019-12-2220-7/+166
| | | | | | | | | | | | | Commit d77ae1552fc21a9f3877f3ed7e13d631f517c825 ("[DebugInfo] Support to emit debugInfo for extern variables") added deebugInfo for extern variables for BPF target. The commit is reverted by 891e25b02d760d0de18c7d46947913b3166047e7 as the committed tests using %clang instead of %clang_cc1 causing test failed in certain scenarios as reported by Reid Kleckner. This patch fixed the tests by using %clang_cc1. Differential Revision: https://reviews.llvm.org/D71818
* [NFC] Remove unnecessary blank and rename align-branch-64-5b.s to ↵Shengchen Kan2019-12-232-2/+2
| | | | align-branch-64-6a.s
* [SCEV] add testcase for get accurate range for addrecexpr with nuw flagczhengsz2019-12-221-0/+20
|
* [ELF] Delete a redundant R_HINT check from isStaticLinkTimeConstant(). NFCFangrui Song2019-12-221-2/+2
| | | | scanReloc() returns when it sees an R_HINT.
* [lldb/ScriptInterpreter] Unify error message for command script importJonas Devlieghere2019-12-224-11/+11
| | | | | Rather than checking for Python explicitly, let the script interpreter handle things and print an error if the functionality is not supported.
* [DAGCombiner] Check term use before applying aggressive FSUB optimisationsCarl Ritson2019-12-232-5/+122
| | | | | | | | | | | | | | | | Summary: Without this check unnecessary FMA instructions are generated when the FSUB terms are reused. This also has the side-effect that the same value is computed to different levels of precision, which can create undesirable effects if the results are used together in subsequent computation. Reviewers: arsenm, nhaehnle, foad, tpr, dstuttard, spatel Reviewed By: arsenm Subscribers: jvesely, wdng, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71656
* build: improve python checks for WindowsSaleem Abdulrasool2019-12-222-167/+25
| | | | | | | | Require a newer CMake on Windows to use the Python3 support that is packaged in CMake. This version is able to check both 32-bit and 64-bit versions and will setup everything properly without the user needing to specify PYTHON_HOME. This enables building lldb's python bindings on Windows under Azure's CI again.
* Revert "[DebugInfo] Support to emit debugInfo for extern variables"Reid Kleckner2019-12-2220-170/+7
| | | | | | | This reverts commit d77ae1552fc21a9f3877f3ed7e13d631f517c825. The tests committed along with this change do not pass, and should be changed to use %clang_cc1.
* Revert "[Concepts] Constrained partial specializations and function overloads."Reid Kleckner2019-12-2218-1021/+102
| | | | | | This reverts commit d3f5769d5e93b30d4a8b4696381d5e4a304992fa. Causes crashes on Chromium. Have reproducer, will reduce and send along.
* [SelectionDAG] Copy FP flags when visiting a binary instruction.Valentin Churavy2019-12-222-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We noticed in Julia that the sequence below no longer turned into a sequence of FMA instructions in LLVM 7+, but it did in LLVM 6. ``` %29 = fmul contract <4 x double> %wide.load, %wide.load16 %30 = fmul contract <4 x double> %wide.load13, %wide.load17 %31 = fmul contract <4 x double> %wide.load14, %wide.load18 %32 = fmul contract <4 x double> %wide.load15, %wide.load19 %33 = fadd fast <4 x double> %vec.phi, %29 %34 = fadd fast <4 x double> %vec.phi10, %30 %35 = fadd fast <4 x double> %vec.phi11, %31 %36 = fadd fast <4 x double> %vec.phi12, %32 ``` Unlike Clang, Julia doesn't set the `unsafe-fp-math=true` function attribute, but rather emits more local instruction flags. This partially undoes https://reviews.llvm.org/D46854 and if required I can try to minimize the test further. Reviewers: spatel, mcberg2017 Reviewed By: spatel Subscribers: chriselrod, merge_guards_bot, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71495
* Revert "[ARM][TypePromotion] Enable by default"Reid Kleckner2019-12-2211-31/+13
| | | | | | | | This reverts commit ee7579409b7d940c4e1314d126e900db30c4edff. It causes crashes during ThinLTO. I suspect the issue is related to races on the global TypeSize variable, which is 80 at the time of the crash.
* [X86] Autogenerate complete checks. NFCCraig Topper2019-12-221-918/+1887
|
* [X86] Fix typo of intrinsic name in test cases. NFCCraig Topper2019-12-221-30/+30
| | | | | | These said test_f32_olt_s for the type of an overloaded intrinsic. But the parser doesn't use that part of the name and just uses the types of the arguments.
* [AMDGPU] Fixes -Wrange-loop-analysis warningsMark de Wever2019-12-222-4/+4
| | | | | | This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71815
* [Hexagon] Fixes -Wrange-loop-analysis warningsMark de Wever2019-12-225-10/+10
| | | | | | This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71814
* [NVPTX] Fixes -Wrange-loop-analysis warningsMark de Wever2019-12-221-1/+1
| | | | | | | | | This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Also removed the top-level const as requested by Aaron Ballman in similar patches. Differential Revision: https://reviews.llvm.org/D71812
* [PowerPC] Fixes -Wrange-loop-analysis warningsMark de Wever2019-12-221-3/+3
| | | | | | This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71811
* [Transforms] Fixes -Wrange-loop-analysis warningsMark de Wever2019-12-225-6/+6
| | | | | | This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71810
* [Analyzer] Fixes -Wrange-loop-analysis warningsMark de Wever2019-12-223-5/+6
| | | | | | This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71809
* [Tools] Fixes -Wrange-loop-analysis warningsMark de Wever2019-12-2211-16/+17
| | | | | | This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71808
* [TableGen] Fixes -Wrange-loop-analysis warningsMark de Wever2019-12-225-10/+10
| | | | | | This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71807
* [Test] Add examples of problematic assembler auto-paddingPhilip Reames2019-12-221-0/+65
| | | | This is in the context of the automatic padding work for the jcc erratum mitigation. These are example cases we need to *not* pad for correctness. Exact mechanism to suppress is still TBD, but saving the tests which have come up.
* [InstCombine] enhance fold for copysign with known sign argSanjay Patel2019-12-222-14/+16
| | | | | This is another optimization suggested in PRPR44153: https://bugs.llvm.org/show_bug.cgi?id=44153
* [ms] [X86] Use "P" modifier on operands to call instructions in inline X86 ↵Eric Astor2019-12-2213-22/+113
| | | | | | | | | | | | | | | | | | | | assembly. Summary: This is documented as the appropriate template modifier for call operands. Fixes PR44272, and adds a regression test. Also adds support for operand modifiers in Intel-style inline assembly. Reviewers: rnk Reviewed By: rnk Subscribers: merge_guards_bot, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D71677
* [AArch64] match splat of bitcasted extract subvector to DUPLANESanjay Patel2019-12-222-15/+51
| | | | | | | | | | This is another potential regression exposed by D63815. Here we peek through a bitcast to find an extract subvector and scale the splat offset based on that: splat (bitcast (extract X, C)), LaneC --> duplane (bitcast X), LaneC' Differential Revision: https://reviews.llvm.org/D71672
* [lldb] Remove unused CompilerDeclContext::IsStructUnionOrClassRaphael Isemann2019-12-225-20/+0
|
* [Sema] SequenceChecker: C++17 sequencing rules for built-in operators <<, ↵Bruno Ricci2019-12-224-48/+164
| | | | | | | | | | | >>, .*, ->*, =, op= Implement the C++17 sequencing rules for the built-in operators <<, >>, .*, ->*, = and op=. Differential Revision: https://reviews.llvm.org/D58297 Reviewed By: rsmith
* [Sema] SequenceChecker: Fix handling of operator ||, && and ?:Bruno Ricci2019-12-223-46/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | The current handling of the operators ||, && and ?: has a number of false positive and false negative. The issues for operator || and && are: 1. We need to add sequencing regions for the LHS and RHS as is done for the comma operator. Not doing so causes false positives in expressions like `((a++, false) || (a++, false))` (from PR39779, see PR22197 for another example). 2. In the current implementation when the evaluation of the LHS fails, the RHS is added to a worklist to be processed later. This results in false negatives in expressions like `(a && a++) + a`. Fix these issues by introducing sequencing regions for the LHS and RHS, and by not deferring the visitation of the RHS. The issues with the ternary operator ?: are similar, with the added twist that we should not warn on expressions like `(x ? y += 1 : y += 2)` since exactly one of the 2nd and 3rd expression is going to be evaluated, but we should still warn on expressions like `(x ? y += 1 : y += 2) = y`. Differential Revision: https://reviews.llvm.org/D57747 Reviewed By: rsmith
* [Sema] SequenceChecker: Add some comments + related small NFCsBruno Ricci2019-12-222-74/+123
| | | | | | | | | | | | NFCs factored out of the following patches: - Change all of the `Expr *` to `const Expr *` in SequenceChecker for const-correctness. SequenceChecker should not modify AST nodes. - Add some comments. - clang-format Differential Revision: https://reviews.llvm.org/D57659 Reviewed By: xbolva00
* [Concepts] Constrained partial specializations and function overloads.Saar Raz2019-12-2218-102/+1021
| | | | | | | Added support for constraint satisfaction checking and partial ordering of constraints in constrained partial specialization and function template overloads. Re-commit after fixing some crashes and warnings. Differential Revision: https://reviews.llvm.org/D41910
* [LLDB] Fix building without SWIGMartin Storsjö2019-12-221-1/+3
| | | | | | | | | | | | Previously, SWIG was only a hard dependency if python bindings were enabled. Since bf03e17c570171c7a52117fe63ace89d58f328d5, scripts/CMakeLists.txt is included unconditionally, while that file adds the hard dependency on SWIG. Instead, only include that file if either python or lua bindings are enabled.
* [Driver] Allow -mnop-mcount for SystemZ and -mfentry for X86 and SystemZFangrui Song2019-12-223-12/+34
| | | | | | | | | | | | | | | | | | | | | | | gcc/config/{i386,s390} support -mnop-mcount. We currently only support -mnop-mcount for SystemZ. The function attribute "mnop-mcount" is ignored on other targets. gcc/config/{i386,s390} support -mfentry. We currently only support -mfentry for X86 and SystemZ. TargetOpcode::FENTRY_CALL is not handled on other targets. % clang -target aarch64 -pg -mfentry a.c -c fatal error: error in backend: Not supported instr: <MCInst 21> -mfentry, -mrecord-mcount, and -mnop-mcount were invented for Linux ftrace. Linux uses $(call cc-option-yn,-mrecord-mcount) to detect if the specific feature is available. Reject unsupported features so that Linux build system will not wrongly consider them available and cause build/runtime failures. Note, GCC has stricter checks that we do not implement, e.g. -fpic/-fpie -fnop-mcount is not allowed on x86, -fpic/-fpie -mfentry is not allowed on x86-32.
* DebugInfo: Remove out of date commentDavid Blaikie2019-12-211-4/+0
|
* [Driver] Verify -mrecord-mcount in Driver, instead of CodeGen after D71627Fangrui Song2019-12-215-16/+17
| | | | | | | | | | | GCC's x86 and s390 ports support -mrecord-mcount. Other ports reject the option. aarch64-linux-gnu-gcc: error: unrecognized command line option ‘-mrecord-mcount’ Allowing this option can cause failures when building Linux kernel for aarch64, powerpc64, etc, which will think the feature is available if the clang command returns 0.
* [lldb/ScriptInterpreter] Fix stale/bogus error messagesJonas Devlieghere2019-12-213-2/+15
| | | | | Fix the nonsensical error messages for when breakpoint and watchpoint callbacks are not supported.
* [lldb/Commands] Honor the scripting language passed (2/2)Jonas Devlieghere2019-12-211-14/+26
| | | | | | This ensures that watchpoint command honors the scripting language passed with `-s`. Currently the argument ignores the actual language and only uses it to differentiate between lldb and script commands.
* [lldb/Lua] Add missing boiler plate to ScriptInterpreter.Jonas Devlieghere2019-12-213-17/+14
| | | | | | - Fix enum entry order. - Fix missing enum case in CommandObjectBreakpointCommand. - Add Lua entry to swtich in LanguageToString and simplify the code.
* [gn build] Port 7376d9eb389LLVM GN Syncbot2019-12-221-2/+6
|
* [gn build] fixup after c3d13d9c56Nico Weber2019-12-211-1/+1
|
* [lldb/Commands] Use the default scripting langauge for BP functionsJonas Devlieghere2019-12-211-1/+4
| | | | | When a function is used as a breakpoint command, use to the debugger's default scripting language, unless a language is explicitly specified.
* [gn build] fold Basic:version into BasicNico Weber2019-12-211-19/+5
| | | | | | | This now defines HAVE_VCS_VERSION_INC for all files in Basic, but now the BUILD.gn file has only a single "sources" field again, and the automerger requires that. Having the automerger work for clang/lib/Basic is a very nice to have, and the downside seems tiny.
* [NFC] Separate getLastArgIntValue to BasicYaxun (Sam) Liu2019-12-215-56/+108
| | | | | | | | getLastArgIntValue is a useful utility function to get command line argument as an integer. Currently it is in Frontend so that it can only be used by clang -cc1. Move it to basic so that it can also be used by clang driver. Differential Revision: https://reviews.llvm.org/D71080
* [lldb/Commands] Honor the scripting language passedJonas Devlieghere2019-12-212-2/+13
| | | | | | This ensures that breakpoint command honors the scripting language passed with `-s`. Currently the argument ignores the actual language and only uses it to differentiate between lldb and script commands.
* [lldb/Commands] Fix bogus enum entry and add Lua (NFC)Jonas Devlieghere2019-12-211-5/+12
| | | | | Fixes a bogus enum value for the scripting language options, adds an entry for Lua and refactored the code to use an exhaustive switch.
* [lldb/Core] Support asking the debugger for a specific script interpreterJonas Devlieghere2019-12-212-9/+16
| | | | | | | | | Rather than holding on to one script interpreter, it should be possible to request a script interpreter for a specific scripting language. The GetScriptInterpreter method now takes an optional scripting language argument. (NFC)
* [Lldb/Lua] Persist Lua state across script interpreter calls.Jonas Devlieghere2019-12-215-9/+24
| | | | | | Don't create a new lua state on every operation. Share a single state across the lifetime of the script interpreter. Add simple locking to prevent two threads from modifying the state concurrently.
* [lldb] Fix windows build after getASTContext() changeRaphael Isemann2019-12-211-3/+2
|
OpenPOWER on IntegriCloud