9 Commits

Author SHA1 Message Date
Diana Picus
1d02724c71 Revert "Turn some C-style vararg into variadic templates"
This reverts commit r299925 because it broke the buildbots. See e.g.
http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15/builds/6008

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299928 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-11 10:07:12 +00:00
Serge Guelton
ec124b3a6f Turn some C-style vararg into variadic templates
Module::getOrInsertFunction is using C-style vararg instead of
variadic templates.

From a user prospective, it forces the use of an annoying nullptr
to mark the end of the vararg, and there's not type checking on the
arguments. The variadic template is an obvious solution to both
issues.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299925 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-11 08:36:52 +00:00
Krzysztof Parzyszek
cfb0063c60 [Hexagon] Avoid infinite loops in HexagonLoopIdiomRecognition
- Avoid explosive growth of the simplification queue by not queuing
  expressions that are alredy in it.
- Add an iteration counter and abort after a sufficiently large number
  of iterations (assuming that it's a symptom of an infinite loop).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298655 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-23 23:01:22 +00:00
Krzysztof Parzyszek
32a326f95b Recommit r298282 with fixes for memory allocation/deallocation
[Hexagon] Recognize polynomial-modulo loop idiom again

Regain the ability to recognize loops calculating polynomial modulo
operation. This ability has been lost due to some changes in the
preceding optimizations. Add code to preprocess the IR to a form
that the pattern matching code can recognize.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298400 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-21 17:09:27 +00:00
Vitaly Buka
9fe7c74027 Revert "[Hexagon] Recognize polynomial-modulo loop idiom again"
Fix memory leaks on check-llvm tests detected by Asan.

This reverts commit r298282.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298329 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-21 00:59:51 +00:00
Krzysztof Parzyszek
fea30225e1 [Hexagon] Recognize polynomial-modulo loop idiom again
Regain the ability to recognize loops calculating polynomial modulo
operation. This ability has been lost due to some changes in the
preceding optimizations. Add code to preprocess the IR to a form
that the pattern matching code can recognize.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298282 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-20 18:12:58 +00:00
Michael Kuperstein
eb0d431154 Shut up GCC warning about operator precedence. NFC.
Technically, this is actually changes the expression and the original
assert was "wrong", but since the conjunction is with true, it doesn't
matter in this case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293709 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-31 22:48:45 +00:00
Krzysztof Parzyszek
670a325260 [Hexagon] Remove unused variable (and silence a warning)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293331 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-27 20:40:14 +00:00
Krzysztof Parzyszek
e264bcdc06 [Hexagon] Add Hexagon-specific loop idiom recognition pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293213 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-26 21:41:10 +00:00