similar to: LLVM pass to optimize redundant branch conditions

Displaying 20 results from an estimated 2000 matches similar to: "LLVM pass to optimize redundant branch conditions"

2020 Apr 23
2
Incorrect behavior in the LLVM dependence analyzer
Hi all, I am trying to use the dependence analyzer in a pass that I am writing and I was surprised to see an incorrect behavior when I try to query DependenceInfo for dependences between instructions. Specifically, if the two instructions are loads/stores accessing an array in a loop, the depend() method would return a dependence regardless of the order of instructions specified. (i.e. if the two
2020 Nov 11
1
Accessing Function analyses in a Module pass with the new pass manager
Hello With the legacy pass manager, we could invoke a Function Pass within the runOnModule() of a Module Pass by simply passing the Function reference to the getAnalysis<>() method. Can the same be achieved using the new Pass Manager? I am writing a Module Pass which requires to access analyses for the different functions, and I need the new pass manager because I need different copies of
2018 Aug 07
4
Generating a loop from llvm bitcode
Hello I am developing a backend that generates OpenCL from llvm bitcode. I start with a revived fork of the original LLVM C-Backend and have been modifying it. One thing that the backend lacked was generating proper loop structures; instead it relied on labels and goto statements. Therefore, I am trying to find a way to identify the loop structure and print it out in the backend. So far, the main
2020 Apr 28
2
Function attributes for memory side-effects
Hi All I am writing a pass which requires checking dependences, and am having trouble dealing with function calls. Specifically, I want to be able to know when a called function does not have any side effects (e.g. math library functions like sqrt), and was wondering if there are attributes that specify this behavior (I know there is the ‘noread’ attribute but wasn’t sure if there’s something
2020 Apr 30
3
Function attributes for memory side-effects
On 4/29/20 4:12 PM, Reid Kleckner via llvm-dev wrote: > On Tue, Apr 28, 2020 at 12:58 PM Ejjeh, Adel via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Specifically, I want to be able to know when a called function does not >> have any side effects (e.g. math library functions like sqrt) >> > > Apologies for the pedantry, but I believe sqrt may
2020 Mar 24
2
[GSoC] Prospective student for Unify ways to move code or check if code is safe to be moved
Np, good luck! :) - Stefanos Στις Τρί, 24 Μαρ 2020 στις 8:55 μ.μ., ο/η RITHIK SHARMA < rithiksh02 at gmail.com> έγραψε: > Many thanks, Stefanos! I really appreciate your help :) I heard from > Whitney. > > Best, > Rithik > > On Tue, 24 Mar 2020 at 23:08, Stefanos Baziotis < > stefanos.baziotis at gmail.com> wrote: > >> Hi Rithik, >> >> I
2020 Apr 06
2
Branch is not optimized because of right shift
On Sun, Apr 5, 2020 at 6:34 PM Stefanos Baziotis < stefanos.baziotis at gmail.com> wrote: > Hi Craig, > > > Adding a nuw to the add -8 is incorrect. > Yeah, I didn't mean to say it was correct. It was just an observation that > with nuw the optimization was happened and I asked if someone thought it > was somehow connected. > > > From the perspective of the
2020 Sep 22
2
How to clean-up SCEVs from sext/zext/trunc ?
Hi Michael, Thanks for the reply. I've seen but have not used it. FWIW, the problem is not how to generate the runtime checks (although it'd be good if we can get it for free), but how to clean up the SCEVs. Does PSE do that ? Cheers, Stefanos Στις Δευ, 21 Σεπ 2020 στις 11:59 π.μ., ο/η Michael Kruse < llvmdev at meinersbur.de> έγραψε: > Have you looked into
2020 Apr 06
2
Branch is not optimized because of right shift
Adding a nuw to the add -8 is incorrect. From the perspective of the unsigned math, -8 is treated a very large positive number. The input to the add is [8,13) and adding a large positive number to it wraps around past 0. So that is guaranteed unsigned wrap. On the other hand, a sub nuw 8 would be correct. ~Craig On Sun, Apr 5, 2020 at 3:27 PM Stefanos Baziotis via llvm-dev < llvm-dev at
2020 Mar 01
2
Commits as new contributor
Hi Hal, > Documentation updates should also be reviewed. Of course, I meant that I'll open a patch in Phabricator. :) I didn't know about code-review patch, thanks. I'll defer the update of developer policy until the other patch is committed so we can have a clearer picture. Kind regards, Stefanos Στις Κυρ, 1 Μαρ 2020 στις 6:17 μ.μ., ο/η Finkel, Hal J. <hfinkel at anl.gov>
2020 Apr 05
2
Branch is not optimized because of right shift
> On Apr 5, 2020, at 22:20, Stefanos Baziotis <stefanos.baziotis at gmail.com> wrote: > > > Any idea about how the compiler could remove the lshr and use a add -16? > Actually, I just figured that doing this test is like solving this: > > 8 <= x/2 <= 13 > 16 <= x <= 26 > 0 <= x - 16 <= 10 => 0 <= x < 11 > The left part is know since
2020 Mar 27
2
[GSoC] Prospective student for Unify ways to move code or check if code is safe to be moved
Hi Rithik, CodeMoverUtils is not aimed for only loop transformations, it can be used by any transformation which want to move code or check if code is safe to be moved. It can currently do both hoist and sink but require control flow equivalent between the original location and the intended to be moved location. I would like to keep the API decoupled from loop, so other transformation can use it.
2020 Apr 05
3
Branch is not optimized because of right shift
Hi, > I think the IR in both of your examples makes things harder for the compiler than expected from the original C source. Note that both versions are from clang with -O2. The first is with version 9.0 and the second is with the trunk. > but in the branch only %0 is used. Sinking the lshr too early made the analysis harder. Yes, exactly! That's what I figured too. > The version
2020 Jul 31
2
Normalize a SCEV Expression
Indeed you're right, thanks! I need a nuw (which I have to invent, with a run-time check, since it doesn't exist in the original but anyway). Best, Stefanos Στις Παρ, 31 Ιουλ 2020 στις 12:36 μ.μ., ο/η Florian Hahn < florian_hahn at apple.com> έγραψε: > > > > On Jul 30, 2020, at 21:03, Stefanos Baziotis via llvm-dev < > llvm-dev at lists.llvm.org> wrote: >
2020 Jul 31
2
What is the "correct" way to add a print pass in the NPM ?
Hi, I'm interested in the sort of pass where you write `-passes=print<pass-name>` and it calls the `print()` function of the pass. I have seen some other passes that can invoke `-passes=print<>` but the implementation seems to be in the wrapper pass for the old pass manager. Thanks, Stefanos Baziotis -------------- next part -------------- An HTML attachment was scrubbed... URL:
2008 Jul 01
2
if one of 4 conditions is not satisfied
I'm trying to do realize the following: I have 4 condtions. If all conditions are satisfied I will paste("PASS") If any of these is not satisfied I will paste("FAIL"). But I have to paste the corresponding failure. ifelse is a good solution but for a 2 conditions. Maybe switch or something like this. Does anyone have an idea how to do? Thanks in advance. Adel -- View
2020 Oct 12
3
MemorySSA LLVM-dev meeting notes and upcoming meetings
Hello, Following up on last week's LLVM-Dev meeting where we discussed MemorySSA related topics, I created the following google doc <https://docs.google.com/document/d/1-uEEZfmRdPThZlctOq9eXlmUaSSAAi8oKxhrPY_lpjk/edit#> with some of the meeting notes and planning for future meetings. For those who participated, please feel free to add items I may have missed into the document and cc
2020 Apr 05
2
Branch is not optimized because of right shift
Hi everyone, In a twitch chat someone redirected me to an example that is not optimized: https://godbolt.org/z/BL-4jL I included the original source code and this is after -O2. We both thought that the -8 branch could be optimized out. I added a nuw in the subtraction and it actually does it. Any thoughts on why that doesn't happen already? Best, Stefanos Baziotis -------------- next part
2020 Sep 18
2
How to clean-up SCEVs from sext/zext/trunc ?
Hi everyone, I've been using SCEV Delinearization but it fails when other-than-pointer-size values are used in the subscripts. To make that clear, say that we have a target in which pointers are 64-bit for (int32_t i ...) for (int32_t j ...) a[i][j] = ... doesn't work while this: for (int64_t i ...) for (int64_t j ...) does work. I assume that the former does not work because
2020 Mar 01
2
Commits as new contributor
Thanks to both! I'll update the docs. Best, Stefanos Στις Κυρ, 1 Μαρ 2020 στις 5:24 μ.μ., ο/η Florian Hahn < florian_hahn at apple.com> έγραψε: > Hi, > > > On 1 Mar 2020, at 14:44, Stefanos Baziotis via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > > I recently was granted commit access, but I'm not really sure what is the > process. > The