[llvm] pr/amdgpu closed world (PR #66488)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 22 09:47:17 PDT 2024


arsenm wrote:

> > > So, when I put it to the current location (FullLTO last callback), all opt and llc test failed because they don't run that.
> > 
> > 
> > I'm still confused. They don't run it, correct. I expect them to still not run AMDGPUAttributor after this patch (keeping all the test updates I did in [b1bcb7c](https://github.com/llvm/llvm-project/commit/b1bcb7ca460fcd317bbc8309e14c8761bf8394e0) intact.
> 
> Options, as far as I can tell: 0) Old PM pipeline, as shown with the first version of this patch: runs always, requires the pipeline to set the closed world assumptions, only then works in a compile job with clang or opt.
> 
> 1. New PM pipeline, as it is w/o this patch: runs always, never have closed world assumptions in a compile job with clang.
> 2. New PM pipeline, read LTOMode in the new PM to determine Post(Thin|Full)LTOLink and enable closed world assumption: runs always, has closed world assumption in ThinLTO compile only (when executed via clang), some test might work with opt.
> 3. New PM pipeline, add to FullLTO pipeline, as it is w/ this patch: runs always with clang (FullLTO or ThinLTO, hence all compiles), doesn't run with opt but tests need llvm-lto(2)
> 
> We could add "-attributor-assume-closed-world" to tests, as I did before, but that only works with 1) and 2). It also again requires us to set the flag from the driver/tooling (clang or llc). That's what I had before.
> 
> @shiltian offered to look into this. Maybe he has more luck than me.

I expect 2? I expect no change in llc behavior (i.e. AMDGPUAttributor does not run in llc, and thus this flag has no effect) 

https://github.com/llvm/llvm-project/pull/66488


More information about the llvm-commits mailing list