Skip to content

Commit 56222a0

Browse files
joker-ephtensorflower-gardener
authored andcommitted
Adjust License.txt file to use the LLVM license
PiperOrigin-RevId: 286906740
1 parent 35807bc commit 56222a0

File tree

593 files changed

+2464
-7723
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

593 files changed

+2464
-7723
lines changed

mlir/LICENSE.TXT

Lines changed: 101 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
Copyright 2019 The MLIR Authors.
1+
==============================================================================
2+
The LLVM Project is under the Apache License v2.0 with LLVM Exceptions:
3+
==============================================================================
24

35
Apache License
46
Version 2.0, January 2004
57
http://www.apache.org/licenses/
68

7-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
9+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
810

9-
1. Definitions.
11+
1. Definitions.
1012

1113
"License" shall mean the terms and conditions for use, reproduction,
1214
and distribution as defined by Sections 1 through 9 of this document.
@@ -65,14 +67,14 @@ Copyright 2019 The MLIR Authors.
6567
on behalf of whom a Contribution has been received by Licensor and
6668
subsequently incorporated within the Work.
6769

68-
2. Grant of Copyright License. Subject to the terms and conditions of
70+
2. Grant of Copyright License. Subject to the terms and conditions of
6971
this License, each Contributor hereby grants to You a perpetual,
7072
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
7173
copyright license to reproduce, prepare Derivative Works of,
7274
publicly display, publicly perform, sublicense, and distribute the
7375
Work and such Derivative Works in Source or Object form.
7476

75-
3. Grant of Patent License. Subject to the terms and conditions of
77+
3. Grant of Patent License. Subject to the terms and conditions of
7678
this License, each Contributor hereby grants to You a perpetual,
7779
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
7880
(except as stated in this section) patent license to make, have made,
@@ -88,7 +90,7 @@ Copyright 2019 The MLIR Authors.
8890
granted to You under this License for that Work shall terminate
8991
as of the date such litigation is filed.
9092

91-
4. Redistribution. You may reproduce and distribute copies of the
93+
4. Redistribution. You may reproduce and distribute copies of the
9294
Work or Derivative Works thereof in any medium, with or without
9395
modifications, and in Source or Object form, provided that You
9496
meet the following conditions:
@@ -129,20 +131,20 @@ Copyright 2019 The MLIR Authors.
129131
reproduction, and distribution of the Work otherwise complies with
130132
the conditions stated in this License.
131133

132-
5. Submission of Contributions. Unless You explicitly state otherwise,
134+
5. Submission of Contributions. Unless You explicitly state otherwise,
133135
any Contribution intentionally submitted for inclusion in the Work
134136
by You to the Licensor shall be under the terms and conditions of
135137
this License, without any additional terms or conditions.
136138
Notwithstanding the above, nothing herein shall supersede or modify
137139
the terms of any separate license agreement you may have executed
138140
with Licensor regarding such Contributions.
139141

140-
6. Trademarks. This License does not grant permission to use the trade
142+
6. Trademarks. This License does not grant permission to use the trade
141143
names, trademarks, service marks, or product names of the Licensor,
142144
except as required for reasonable and customary use in describing the
143145
origin of the Work and reproducing the content of the NOTICE file.
144146

145-
7. Disclaimer of Warranty. Unless required by applicable law or
147+
7. Disclaimer of Warranty. Unless required by applicable law or
146148
agreed to in writing, Licensor provides the Work (and each
147149
Contributor provides its Contributions) on an "AS IS" BASIS,
148150
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
@@ -152,7 +154,7 @@ Copyright 2019 The MLIR Authors.
152154
appropriateness of using or redistributing the Work and assume any
153155
risks associated with Your exercise of permissions under this License.
154156

155-
8. Limitation of Liability. In no event and under no legal theory,
157+
8. Limitation of Liability. In no event and under no legal theory,
156158
whether in tort (including negligence), contract, or otherwise,
157159
unless required by applicable law (such as deliberate and grossly
158160
negligent acts) or agreed to in writing, shall any Contributor be
@@ -164,7 +166,7 @@ Copyright 2019 The MLIR Authors.
164166
other commercial damages or losses), even if such Contributor
165167
has been advised of the possibility of such damages.
166168

167-
9. Accepting Warranty or Additional Liability. While redistributing
169+
9. Accepting Warranty or Additional Liability. While redistributing
168170
the Work or Derivative Works thereof, You may choose to offer,
169171
and charge a fee for, acceptance of support, warranty, indemnity,
170172
or other liability obligations and/or rights consistent with this
@@ -175,9 +177,9 @@ Copyright 2019 The MLIR Authors.
175177
incurred by, or claims asserted against, such Contributor by reason
176178
of your accepting any such warranty or additional liability.
177179

178-
END OF TERMS AND CONDITIONS
180+
END OF TERMS AND CONDITIONS
179181

180-
APPENDIX: How to apply the Apache License to your work.
182+
APPENDIX: How to apply the Apache License to your work.
181183

182184
To apply the Apache License to your work, attach the following
183185
boilerplate notice, with the fields enclosed by brackets "[]"
@@ -188,18 +190,90 @@ Copyright 2019 The MLIR Authors.
188190
same "printed page" as the copyright notice for easier
189191
identification within third-party archives.
190192

191-
Copyright [yyyy] [name of copyright owner]
192-
193-
Licensed under the Apache License, Version 2.0 (the "License");
194-
you may not use this file except in compliance with the License.
195-
You may obtain a copy of the License at
196-
197-
http://www.apache.org/licenses/LICENSE-2.0
198-
199-
Unless required by applicable law or agreed to in writing, software
200-
distributed under the License is distributed on an "AS IS" BASIS,
201-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202-
See the License for the specific language governing permissions and
203-
limitations under the License.
204-
193+
Copyright [yyyy] [name of copyright owner]
194+
195+
Licensed under the Apache License, Version 2.0 (the "License");
196+
you may not use this file except in compliance with the License.
197+
You may obtain a copy of the License at
198+
199+
http://www.apache.org/licenses/LICENSE-2.0
200+
201+
Unless required by applicable law or agreed to in writing, software
202+
distributed under the License is distributed on an "AS IS" BASIS,
203+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
204+
See the License for the specific language governing permissions and
205+
limitations under the License.
206+
207+
208+
---- LLVM Exceptions to the Apache 2.0 License ----
209+
210+
As an exception, if, as a result of your compiling your source code, portions
211+
of this Software are embedded into an Object form of such source code, you
212+
may redistribute such embedded portions in such Object form without complying
213+
with the conditions of Sections 4(a), 4(b) and 4(d) of the License.
214+
215+
In addition, if you combine or link compiled forms of this Software with
216+
software that is licensed under the GPLv2 ("Combined Software") and if a
217+
court of competent jurisdiction determines that the patent provision (Section
218+
3), the indemnity provision (Section 9) or other Section of the License
219+
conflicts with the conditions of the GPLv2, you may retroactively and
220+
prospectively choose to deem waived or otherwise exclude such Section(s) of
221+
the License, but only in their entirety and only with respect to the Combined
222+
Software.
223+
224+
==============================================================================
225+
Software from third parties included in the LLVM Project:
226+
==============================================================================
227+
The LLVM Project contains third party software which is under different license
228+
terms. All such code will be identified clearly using at least one of two
229+
mechanisms:
230+
1) It will be in a separate directory tree with its own `LICENSE.txt` or
231+
`LICENSE` file at the top containing the specific license and restrictions
232+
which apply to that software, or
233+
2) It will contain specific license and restriction terms at the top of every
234+
file.
235+
236+
==============================================================================
237+
Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy):
238+
==============================================================================
239+
University of Illinois/NCSA
240+
Open Source License
241+
242+
Copyright (c) 2003-2019 University of Illinois at Urbana-Champaign.
243+
All rights reserved.
244+
245+
Developed by:
246+
247+
LLVM Team
248+
249+
University of Illinois at Urbana-Champaign
250+
251+
http://llvm.org
252+
253+
Permission is hereby granted, free of charge, to any person obtaining a copy of
254+
this software and associated documentation files (the "Software"), to deal with
255+
the Software without restriction, including without limitation the rights to
256+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
257+
of the Software, and to permit persons to whom the Software is furnished to do
258+
so, subject to the following conditions:
259+
260+
* Redistributions of source code must retain the above copyright notice,
261+
this list of conditions and the following disclaimers.
262+
263+
* Redistributions in binary form must reproduce the above copyright notice,
264+
this list of conditions and the following disclaimers in the
265+
documentation and/or other materials provided with the distribution.
266+
267+
* Neither the names of the LLVM Team, University of Illinois at
268+
Urbana-Champaign, nor the names of its contributors may be used to
269+
endorse or promote products derived from this Software without specific
270+
prior written permission.
271+
272+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
273+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
274+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
275+
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
276+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
277+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
278+
SOFTWARE.
205279

mlir/bindings/python/pybind.cpp

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
//===- pybind.cpp - MLIR Python bindings ----------------------------------===//
22
//
3-
// Copyright 2019 The MLIR Authors.
3+
// Part of the MLIR Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
46
//
5-
// Licensed under the Apache License, Version 2.0 (the "License");
6-
// you may not use this file except in compliance with the License.
7-
// You may obtain a copy of the License at
8-
//
9-
// http://www.apache.org/licenses/LICENSE-2.0
10-
//
11-
// Unless required by applicable law or agreed to in writing, software
12-
// distributed under the License is distributed on an "AS IS" BASIS,
13-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
// See the License for the specific language governing permissions and
15-
// limitations under the License.
16-
// =============================================================================
7+
//===----------------------------------------------------------------------===//
178

189
#include "llvm/ADT/SmallVector.h"
1910
#include "llvm/ADT/StringRef.h"

mlir/examples/toy/Ch1/include/toy/AST.h

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
//===- AST.h - Node definition for the Toy AST ----------------------------===//
22
//
3-
// Copyright 2019 The MLIR Authors.
3+
// Part of the MLIR Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
46
//
5-
// Licensed under the Apache License, Version 2.0 (the "License");
6-
// you may not use this file except in compliance with the License.
7-
// You may obtain a copy of the License at
8-
//
9-
// http://www.apache.org/licenses/LICENSE-2.0
10-
//
11-
// Unless required by applicable law or agreed to in writing, software
12-
// distributed under the License is distributed on an "AS IS" BASIS,
13-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
// See the License for the specific language governing permissions and
15-
// limitations under the License.
16-
// =============================================================================
7+
//===----------------------------------------------------------------------===//
178
//
189
// This file implements the AST for the Toy language. It is optimized for
1910
// simplicity, not efficiency. The AST forms a tree structure where each node

mlir/examples/toy/Ch1/include/toy/Lexer.h

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
//===- Lexer.h - Lexer for the Toy language -------------------------------===//
22
//
3-
// Copyright 2019 The MLIR Authors.
3+
// Part of the MLIR Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
46
//
5-
// Licensed under the Apache License, Version 2.0 (the "License");
6-
// you may not use this file except in compliance with the License.
7-
// You may obtain a copy of the License at
8-
//
9-
// http://www.apache.org/licenses/LICENSE-2.0
10-
//
11-
// Unless required by applicable law or agreed to in writing, software
12-
// distributed under the License is distributed on an "AS IS" BASIS,
13-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
// See the License for the specific language governing permissions and
15-
// limitations under the License.
16-
// =============================================================================
7+
//===----------------------------------------------------------------------===//
178
//
189
// This file implements a simple Lexer for the Toy language.
1910
//

mlir/examples/toy/Ch1/include/toy/Parser.h

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
//===- Parser.h - Toy Language Parser -------------------------------------===//
22
//
3-
// Copyright 2019 The MLIR Authors.
3+
// Part of the MLIR Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
46
//
5-
// Licensed under the Apache License, Version 2.0 (the "License");
6-
// you may not use this file except in compliance with the License.
7-
// You may obtain a copy of the License at
8-
//
9-
// http://www.apache.org/licenses/LICENSE-2.0
10-
//
11-
// Unless required by applicable law or agreed to in writing, software
12-
// distributed under the License is distributed on an "AS IS" BASIS,
13-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
// See the License for the specific language governing permissions and
15-
// limitations under the License.
16-
// =============================================================================
7+
//===----------------------------------------------------------------------===//
178
//
189
// This file implements the parser for the Toy language. It processes the Token
1910
// provided by the Lexer and returns an AST.

mlir/examples/toy/Ch1/parser/AST.cpp

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
//===- AST.cpp - Helper for printing out the Toy AST ----------------------===//
22
//
3-
// Copyright 2019 The MLIR Authors.
3+
// Part of the MLIR Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
46
//
5-
// Licensed under the Apache License, Version 2.0 (the "License");
6-
// you may not use this file except in compliance with the License.
7-
// You may obtain a copy of the License at
8-
//
9-
// http://www.apache.org/licenses/LICENSE-2.0
10-
//
11-
// Unless required by applicable law or agreed to in writing, software
12-
// distributed under the License is distributed on an "AS IS" BASIS,
13-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
// See the License for the specific language governing permissions and
15-
// limitations under the License.
16-
// =============================================================================
7+
//===----------------------------------------------------------------------===//
178
//
189
// This file implements the AST dump for the Toy language.
1910
//

mlir/examples/toy/Ch1/toyc.cpp

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
//===- toyc.cpp - The Toy Compiler ----------------------------------------===//
22
//
3-
// Copyright 2019 The MLIR Authors.
3+
// Part of the MLIR Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
46
//
5-
// Licensed under the Apache License, Version 2.0 (the "License");
6-
// you may not use this file except in compliance with the License.
7-
// You may obtain a copy of the License at
8-
//
9-
// http://www.apache.org/licenses/LICENSE-2.0
10-
//
11-
// Unless required by applicable law or agreed to in writing, software
12-
// distributed under the License is distributed on an "AS IS" BASIS,
13-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
// See the License for the specific language governing permissions and
15-
// limitations under the License.
16-
// =============================================================================
7+
//===----------------------------------------------------------------------===//
178
//
189
// This file implements the entry point for the Toy compiler.
1910
//

mlir/examples/toy/Ch2/include/toy/AST.h

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
//===- AST.h - Node definition for the Toy AST ----------------------------===//
22
//
3-
// Copyright 2019 The MLIR Authors.
3+
// Part of the MLIR Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
46
//
5-
// Licensed under the Apache License, Version 2.0 (the "License");
6-
// you may not use this file except in compliance with the License.
7-
// You may obtain a copy of the License at
8-
//
9-
// http://www.apache.org/licenses/LICENSE-2.0
10-
//
11-
// Unless required by applicable law or agreed to in writing, software
12-
// distributed under the License is distributed on an "AS IS" BASIS,
13-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
// See the License for the specific language governing permissions and
15-
// limitations under the License.
16-
// =============================================================================
7+
//===----------------------------------------------------------------------===//
178
//
189
// This file implements the AST for the Toy language. It is optimized for
1910
// simplicity, not efficiency. The AST forms a tree structure where each node

mlir/examples/toy/Ch2/include/toy/Dialect.h

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
//===- Dialect.h - Dialect definition for the Toy IR ----------------------===//
22
//
3-
// Copyright 2019 The MLIR Authors.
3+
// Part of the MLIR Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
46
//
5-
// Licensed under the Apache License, Version 2.0 (the "License");
6-
// you may not use this file except in compliance with the License.
7-
// You may obtain a copy of the License at
8-
//
9-
// http://www.apache.org/licenses/LICENSE-2.0
10-
//
11-
// Unless required by applicable law or agreed to in writing, software
12-
// distributed under the License is distributed on an "AS IS" BASIS,
13-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
// See the License for the specific language governing permissions and
15-
// limitations under the License.
16-
// =============================================================================
7+
//===----------------------------------------------------------------------===//
178
//
189
// This file implements the IR Dialect for the Toy language.
1910
// See g3doc/Tutorials/Toy/Ch-2.md for more information.

0 commit comments

Comments
 (0)