- May 06, 2019
-
-
Roman Lebedev authored
I'm not sure what i was thinking when i wrote it to point at the directive. It's at the very least confusing, and in the `for` is very misleading. We should point at the actual Stmt out of which the exception escapes, to highlight where it should be fixed e.g. via adding try-catch block. Yes, this breaks existing NOLINT, which is why this change needs to happen now, not any later. llvm-svn: 360002
-
Simon Pilgrim authored
Avoids a scan-build "uninitialized value" warning in X86FastISel::X86SelectFPExtOrFPTrunc llvm-svn: 360001
-
Simon Pilgrim authored
Matches what we do in other getValueType functions and fixes a null dereference warning in scan-build. Also cleans up the rest of the function - use auto and standardize the variable names. llvm-svn: 360000
-
Simon Pilgrim authored
llvm-svn: 359999
-
Kristof Umann authored
https://bugs.llvm.org/show_bug.cgi?id=41741 Pretty much the same as D61246 and D61106, this time for __complex__ types. Upon further investigation, I realized that we should regard all types Type::isScalarType returns true for as primitive, so I merged isMemberPointerType(), isBlockPointerType() and isAnyComplexType()` into that instead. I also stumbled across yet another bug, https://bugs.llvm.org/show_bug.cgi?id=41753, but it seems to be unrelated to this checker. Differential Revision: https://reviews.llvm.org/D61569 llvm-svn: 359998
-
Roman Lebedev authored
Thus it does not assume that the old basic block is the basic block for which we are looking at successors. Not reviewed, but seems rather trivial, in line with the rest of previous few patches. llvm-svn: 359997
-
Roman Lebedev authored
Summary: It is a common thing to loop over every `PHINode` in some `BasicBlock` and change old `BasicBlock` incoming block to a new `BasicBlock` incoming block. `replaceSuccessorsPhiUsesWith()` already had code to do that, it just wasn't a function. So outline it into a new function, and use it. Reviewers: chandlerc, craig.topper, spatel, danielcdh Reviewed By: craig.topper Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61013 llvm-svn: 359996
-
Roman Lebedev authored
Summary: There is `PHINode::getBasicBlockIndex()`, `PHINode::setIncomingBlock()` and `PHINode::getNumOperands()`, but no function to replace every specified `BasicBlock*` predecessor with some other specified `BasicBlock*`. Clearly, there are a lot of places that could use that functionality. Reviewers: chandlerc, craig.topper, spatel, danielcdh Reviewed By: craig.topper Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61011 llvm-svn: 359995
-
Roman Lebedev authored
Summary: There is `Instruction::getNumSuccessors()`, `Instruction::getSuccessor()` and `Instruction::setSuccessor()`, but no function to replace every specified `BasicBlock*` successor with some other specified `BasicBlock*`. I've found one place where it should clearly be used. Reviewers: chandlerc, craig.topper, spatel, danielcdh Reviewed By: craig.topper Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61010 llvm-svn: 359994
-
Roman Lebedev authored
Summary: If `deleteDeadLoop()` is called on such a loop, that has "bad" exit block, one that e.g. has no terminator instruction, the `DIBuilder::insertDbgValueIntrinsic()` will be told to insert the Dbg Value Intrinsic after `nullptr` (since there is no first non-PHI instruction), which will cause it to not insert those instructions into any basic block. The instructions will be parent-less, and IR verifier will complain. It is rather obvious to track down the root cause when that happens, so let's just assert it never happens. Reviewers: sanjoy, davide, vsk Reviewed By: vsk Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61008 llvm-svn: 359993
-
Jonas Devlieghere authored
This particular test fails once every so many runs on GreenDragon. Given that the randomness in the inferior isn't critical to the test, I removed it in the hopes that it is the cause of the flakiness. llvm-svn: 359992
-
Simon Pilgrim authored
Avoids a cppcheck "Local variable name shadows outer variable" warning. llvm-svn: 359991
-
Cameron McInally authored
llvm-svn: 359990
-
Simon Pilgrim authored
llvm-svn: 359989
-
Craig Topper authored
llvm-svn: 359988
-
Craig Topper authored
[LLParser] Remove unnecessary error check making sure NUW/NSW flags aren't set on a non-integer operation. Summary: This check appears to be a leftover from when add/sub/mul could be either integer or fp. The NSW/NUW flags are only set for add/sub/mul/shl earlier. And we check that those operations only have integer types just below this. So it seems unnecessary to explicitly error for NUW/NSW being used on a add/sub/mul that have the wrong type that would later error for that. Reviewers: spatel, dblaikie, jyknight, arsenm Reviewed By: spatel Subscribers: wdng, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D61562 llvm-svn: 359987
-
Craig Topper authored
Summary: These methods previously took a 0, 1, or 2 to indicate what types were allowed, but the 0 encoding which meant both fp and integer types has been unused for years. Its leftover from when add/sub/mul used to be shared between int and fp Simplify it by changing it to just a bool to distinquish int and fp. Reviewers: spatel, dblaikie, jyknight, arsenm Reviewed By: spatel Subscribers: wdng, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61561 llvm-svn: 359986
-
Craig Topper authored
Summary: Remove duplicate checks that both operands have the same type. This is checked before the switch. Use 'integer' or 'floating-point' instead of 'arithmetic' type. I think this might be a leftover to the days when floating point and integer operations shared the same opcodes. Reviewers: spatel, RKSimon, dblaikie Reviewed By: RKSimon Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61558 llvm-svn: 359985
-
Simon Pilgrim authored
where either the modification or the other access is unreachable. ........ Try to fix buildbots llvm-svn: 359984
-
Andrea Di Biagio authored
llvm-svn: 359983
-
Cameron McInally authored
llvm-svn: 359982
-
- May 05, 2019
-
-
Simon Pilgrim authored
Fixes cppcheck warning. llvm-svn: 359981
-
Nicolas Lesser authored
Summary: currently for: ``` template<typename ... T> void f(T... t) { auto l = [t...]{}; } ``` `clang -ast-print file.cpp` outputs: ``` template <typename ...T> void f(T ...t) { auto l = [t] { } ; } ``` notice that there is not `...` in the capture list of the lambda. this patch fixes this issue. and add test for it. Patch by Tyker Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61556 llvm-svn: 359980 -
Nicolas Lesser authored
instead of as parameter name without a type. llvm-svn: 359979
-
Michal Gorny authored
Use output constraints for specific general-purpose registers in order to simplify the tests. They save us from having to manually put the values in correct registers, and reduce the number of registers needed as a result. llvm-svn: 359978
-
Michal Gorny authored
llvm-svn: 359977
-
Simon Pilgrim authored
llvm-svn: 359976
-
Simon Pilgrim authored
Ideally getTreeCost() should be const as well but non-const Type creation would need to be addressed first. llvm-svn: 359975
-
Simon Pilgrim authored
llvm-svn: 359974
-
Simon Pilgrim authored
llvm-svn: 359973
-
- May 04, 2019
-
-
Cameron McInally authored
llvm-svn: 359970
-
Sanjay Patel authored
This is a subset of the original commit from rL359879 which was reverted because it could crash when using the 'RemovedInstructions' structure that enables delayed deletion of dead instructions. The motivating compile-time win does not require that change though. We should get most of that win from this change alone. Using/updating a dominator tree to match math overflow patterns may be very expensive in compile-time (because of the way CGP uses a DT), so just handle the single-block case. See post-commit thread for rL354298 for more details: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190422/646276.html Differential Revision: https://reviews.llvm.org/D61075 llvm-svn: 359969
-
Nicolas Lesser authored
llvm-svn: 359968
-
Hamza Sood authored
Differential Revision: https://reviews.llvm.org/D36527 llvm-svn: 359967
-
Nicolas Lesser authored
In r359949 several AST node constructors were modified without the corresponding change in lldb, which caused build failures. llvm-svn: 359966
-
Fangrui Song authored
This restores part of the good change reverted by r359830. llvm-svn: 359965
-
Richard Smith authored
* __VA_OPT__ is expanded if the *expanded* __VA_ARGS__ is non-empty, not if the original argument contained no tokens. * Placemarkers at the start and end of __VA_OPT__ are retained just long enough to paste them with adjacent ## operators. We never paste "across" a discarded placemarker. llvm-svn: 359964
-
Stanislav Mekhanoshin authored
llvm-svn: 359963
-
Richard Smith authored
where either the modification or the other access is unreachable. llvm-svn: 359962
-
Stanislav Mekhanoshin authored
Differential Revision: https://reviews.llvm.org/D61536 llvm-svn: 359961
-